我有一個問題瓦特/一個非常基本的登錄屏幕。它確實有一個視圖鰭和相對佈局,據我所知,它們都支持API 1。收到以下錯誤:了Android 1.5瓦特/ XML可繪製
08-23 13:20:45.567: ERROR/AndroidRuntime(801): Uncaught handler: thread main exiting due to uncaught exception
08-23 13:20:45.577: ERROR/AndroidRuntime(801): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.munzee.android.client/com.munzee.android.client.LogInActivity}: android.view.InflateException: Binary XML file line #22: Error inflating class java.lang.reflect.Constructor
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.app.ActivityThread.access$1800(ActivityThread.java:112)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.os.Handler.dispatchMessage(Handler.java:99)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.os.Looper.loop(Looper.java:123)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.app.ActivityThread.main(ActivityThread.java:3948)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at java.lang.reflect.Method.invokeNative(Native Method)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at java.lang.reflect.Method.invoke(Method.java:521)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at dalvik.system.NativeStart.main(Native Method)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): Caused by: android.view.InflateException: Binary XML file line #22: Error inflating class java.lang.reflect.Constructor
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.view.LayoutInflater.createView(LayoutInflater.java:512)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.view.LayoutInflater.rInflate(LayoutInflater.java:617)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.view.LayoutInflater.rInflate(LayoutInflater.java:620)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.view.LayoutInflater.inflate(LayoutInflater.java:407)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:309)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.app.Activity.setContentView(Activity.java:1626)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at com.munzee.android.client.LogInActivity.onCreate(LogInActivity.java:74)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): ... 11 more
08-23 13:20:45.577: ERROR/AndroidRuntime(801): Caused by: java.lang.reflect.InvocationTargetException
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.widget.ImageView.<init>(ImageView.java:103)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at java.lang.reflect.Constructor.constructNative(Native Method)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.view.LayoutInflater.createView(LayoutInflater.java:499)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): ... 23 more
08-23 13:20:45.577: ERROR/AndroidRuntime(801): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/title_logo.xml from drawable resource ID #0x7f020056
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.content.res.Resources.loadDrawable(Resources.java:1625)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.widget.ImageView.<init>(ImageView.java:113)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): ... 27 more
08-23 13:20:45.577: ERROR/AndroidRuntime(801): Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f020058
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.content.res.Resources.getValue(Resources.java:846)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.content.res.Resources.getDrawable(Resources.java:534)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:146)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:749)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:695)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): at android.content.res.Resources.loadDrawable(Resources.java:1622)
08-23 13:20:45.577: ERROR/AndroidRuntime(801): ... 29 more
我看着另一SO後(其中建議刪除繪製-MDPI到繪製文件夾),這並沒有幫助。
什麼是瘋狂的是在我的R.java沒有用於0x7f020056或0x7f020058沒有資源ID ...
克里斯。
你能證明你這個com.munzee.android.client.LogInActivity文件 – Pratik