Reputation: 1051
I have released my app to Market yesterday and I get a strange crash report telling me that it doesnt find the layout.main. If the layout wouldnt exist, I would wouldnt be able to start the app on my own device. Which is not the case. Too bad the report doesnt tell which device or Android version it is running on. Maybe someone can download my app (mytaxicontrol - it's free) and tell me under which conditions its crashing or has an idea what the problem could be?
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mytaxicontrol/com.mytaxicontrol.MyTaxiControlActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f030004
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1651)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1667)
at android.app.ActivityThread.access$1500(ActivityThread.java:117)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:935)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3687)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f030004
at android.content.res.Resources.getValue(Resources.java:892)
at android.content.res.Resources.loadXmlResourceParser(Resources.java:1869)
at android.content.res.Resources.getLayout(Resources.java:731)
at android.view.LayoutInflater.inflate(LayoutInflater.java:318)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:209)
at android.app.Activity.setContentView(Activity.java:1657)
at com.mytaxicontrol.MyTaxiControlActivity.onCreate(Unknown Source)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1615)
Upvotes: 1
Views: 396
Reputation: 7609
In the manifest you should have added this because you do not need support for small screens devices as layout is not mentioned.
<supports-screens
android:smallScreens="false"
android:normalScreens="true"
android:largeScreens="true"
android:anyDensity="true" />
And your layout folder name should be
layout-normal
layout-large
Upvotes: 1