Resource is missing android 1.5


Last Updated:

  1. kaliki

    kaliki Member This Topic's Starter

    Joined:
    Jan 21, 2010
    Messages:
    11
    Likes Received:
    0
    [FONT=Courier, Monospaced]Hi, i have an app that runs on some 1.5 devices and is preloaded. I
    have now created an update for my app. I have just tested upgrade and
    it has an issue. I'd like to mention that my upgraded version has more
    string/drawable resources than the old one. What happens is when i get
    to the package installer and get the message "This will replace
    another application" logcat warns me:
    [/FONT][FONT=Courier, Monospaced]10-26 09:58:23.986: WARN/PackageManager(860): Failure retrieving icon
    0x7f02004b in package com.example
    10-26 09:58:23.986: WARN/PackageManager(860):
    android.content.res.Resources$NotFoundException: Resource ID
    #0x7f02004b
    10-26 09:58:23.986: WARN/PackageManager(860): at
    android.content.res.Resources.getValue(Resources.java:846)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    android.content.res.Resources.getDrawable(Resources.java:534)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    android.app.ApplicationContext
    $ApplicationPackageManager.getDrawable(ApplicationContext.java:1923)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    android.content.pm.PackageItemInfo.loadIcon(PackageItemInfo.java:112)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    com.android.packageinstaller.PackageUtil.getApplicationIcon(PackageUtil.java:
    92)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    com.android.packageinstaller.PackageUtil.initAppSnippet(PackageUtil.java:
    101)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    com.android.packageinstaller.PackageInstallerActivity.onCreate(PackageInstallerActivity.java:
    349)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
    1123)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
    2231)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
    2284)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    android.app.ActivityThread.access$1800(ActivityThread.java:112)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    android.os.Handler.dispatchMessage(Handler.java:99)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    android.os.Looper.loop(Looper.java:123)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    android.app.ActivityThread.main(ActivityThread.java:3948)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    java.lang.reflect.Method.invokeNative(Native Method)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    java.lang.reflect.Method.invoke(Method.java:521)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    com.android.internal.os.ZygoteInit
    $MethodAndArgsCaller.run(ZygoteInit.java:782)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
    10-26 09:58:23.986: WARN/PackageManager(860): at
    dalvik.system.NativeStart.main(Native Method)
    10-26 09:58:24.006: WARN/ResourceType(860): getEntry failing because
    entryIndex 180 is beyond type entryCount 152
    10-26 09:58:24.006: WARN/ResourceType(860): Failure getting entry for
    0x7f0800b4 (t=7 e=180) in package 0: 0x80000001
    10-26 09:58:24.026: WARN/PackageManager(860): Failure retrieving text
    0x7f0800b4 in package com.example
    10-26 09:58:24.026: WARN/PackageManager(860):
    android.content.res.Resources$NotFoundException: String resource ID
    #0x7f0800b4
    10-26 09:58:24.026: WARN/PackageManager(860): at
    android.content.res.Resources.getText(Resources.java:155)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    android.app.ApplicationContext
    $ApplicationPackageManager.getText(ApplicationContext.java:2240)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    android.content.pm.PackageItemInfo.loadLabel(PackageItemInfo.java:88)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    com.android.packageinstaller.PackageUtil.getApplicationLabel(PackageUtil.java:
    81)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    com.android.packageinstaller.PackageUtil.initAppSnippet(PackageUtil.java:
    103)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    com.android.packageinstaller.PackageInstallerActivity.onCreate(PackageInstallerActivity.java:
    349)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:
    1123)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    android.app.ActivityThread.performLaunchActivity(ActivityThread.java:
    2231)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:
    2284)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    android.app.ActivityThread.access$1800(ActivityThread.java:112)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    android.os.Handler.dispatchMessage(Handler.java:99)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    android.os.Looper.loop(Looper.java:123)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    android.app.ActivityThread.main(ActivityThread.java:3948)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    java.lang.reflect.Method.invokeNative(Native Method)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    java.lang.reflect.Method.invoke(Method.java:521)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    com.android.internal.os.ZygoteInit
    $MethodAndArgsCaller.run(ZygoteInit.java:782)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
    10-26 09:58:24.026: WARN/PackageManager(860): at
    dalvik.system.NativeStart.main(Native Method)
    [/FONT]
    [FONT=Courier, Monospaced]The real issue is after the upgrade success. I press done and go to
    device menu where my app is still displaying the old app icon and old
    title. When i press it to start my app it says app is not installed so
    i can't launch it:(
    [/FONT]
    [FONT=Courier, Monospaced]The only solution i found so far is to restart the device, this way
    the new icon and title appears and my app works.
    I have reduced my string resources in the new version and this helps,
    now only the icon issue remains but this is not a solution.
    This only happens on android 1.5 devices, 1.6+ works fine.
    Does anyone have a better solution for this? [/FONT]
     

    Advertisement

Share This Page

Loading...