tags:

views:

25

answers:

1

I don't know why. Install the package directly won't have any problem. But will fail because of Force Close if update the old package. the log is:

09-02 18:19:20.922: ERROR/AndroidRuntime(1659): Caused by: android.view.InflateException: Binary XML file line #5: Error inflating class java.lang.reflect.Constructor
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.view.LayoutInflater.createView(LayoutInflater.java:512)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:318)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.app.Activity.setContentView(Activity.java:1631)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at com.yidongsoft.ultraNoteEnhancedRegister.StartUI.setupWidgets(StartUI.java:237)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at com.yidongsoft.ultraNoteEnhancedRegister.StartUI.initialize(StartUI.java:129)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at com.yidongsoft.ultraNoteEnhancedRegister.StartUI.checkPassword(StartUI.java:591)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at com.yidongsoft.ultraNoteEnhancedRegister.StartUI.onCreate(StartUI.java:112)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1132)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     ... 11 more
09-02 18:19:20.922: ERROR/AndroidRuntime(1659): Caused by: java.lang.reflect.InvocationTargetException
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.widget.ExpandableListView.<init>(ExpandableListView.java:198)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at java.lang.reflect.Constructor.constructNative(Native Method)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.view.LayoutInflater.createView(LayoutInflater.java:499)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     ... 25 more
09-02 18:19:20.922: ERROR/AndroidRuntime(1659): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-480x320/list_selector_background.xml from drawable resource ID #0x7f020005
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.content.res.Resources.loadDrawable(Resources.java:1625)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.widget.ListView.<init>(ListView.java:160)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.widget.ExpandableListView.<init>(ExpandableListView.java:202)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     ... 29 more
09-02 18:19:20.922: ERROR/AndroidRuntime(1659): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-480x320/list_selector_background.xml from xml type drawable resource ID #0x7f020005
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.content.res.Resources.loadXmlResourceParser(Resources.java:1843)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.content.res.Resources.loadDrawable(Resources.java:1620)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     ... 32 more
09-02 18:19:20.922: ERROR/AndroidRuntime(1659): Caused by: java.io.FileNotFoundException: res/drawable-480x320/list_selector_background.xml
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.content.res.AssetManager.openXmlAssetNative(Native Method)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:471)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     at android.content.res.Resources.loadXmlResourceParser(Resources.java:1825)
09-02 18:19:20.922: ERROR/AndroidRuntime(1659):     ... 33 more

The file not found seems android embedded resources. Can any one explain why? I am using HTC Magic, official rom 1.5

A: 

The -480x320 just like -hdpi, -ldpi, -mdpi doesn't work in android 1.5.

Macarse
I know that. Let's assume you got the real reason. But why the package is OK if you install the package directly, not update from old version? So sorry I didn't mention this in original post.
Henry Sou
And, I don't use 480x320 in my drawables. I don't know why the log said this.
Henry Sou
@Henry Sou: Are you compiling against > 3 and not setting targetVersion in your manifest?
Macarse
No. I didn't set the targetVersion at all. About the SDK version, I only set:<uses-sdk android:minSdkVersion="3" />But it was set long long ago.
Henry Sou
what does it say on your default.properties file?
Macarse
# This file is automatically generated by Android Tools.# Do not modify this file -- YOUR CHANGES WILL BE ERASED!# # This file must be checked in Version Control Systems.# # To customize properties used by the Ant build system use,# "build.properties", and override values to adapt the script to your# project structure.# Indicates whether an apk should be generated for each density.split.density=false# Project target.target=android-4
Henry Sou
split.density=falsetarget=android-4
Henry Sou
So sorry. Stupid Windows...
Henry Sou
You are building with android 1.6. Try changing it to android 1.5.
Macarse
OK. Thanks! But I still don't know what the reason it is. Why will it say a system resource not found? Totally confused.
Henry Sou
Stuff like `-480x320` doesn't work on android 1.5 so I guess you are using and android component that was modified in android 1.6 to support different screen sizes. And when it tries to look for `res/drawable-480x320/list_selector_background.xml` for example it will not find it.
Macarse