I have created an android application, that doesn't run on Tablet.
I have added xml
files in res/layout-large
folder. When I run on emulator it's working but in Tablet it gives error like- Unfortunately xxx has stopped.
Logcat output:
java.lang.RuntimeException: Unable to start activity ComponentInfo{idev.android.soulspotter/idev.android.soulspotter.Login}: android.content.res.Resources$NotFoundException: Resource ID
0x7f030021
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1956) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) at android.app.ActivityThread.access$600(ActivityThread.java:123) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4424) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551) at dalvik.system.NativeStart.main(Native Method) Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f030022 at android.content.res.Resources.getValue(Resources.java:1018) at android.content.res.Resources.loadXmlResourceParser(Resources.java:2105) at android.content.res.Resources.getLayout(Resources.java:857) at android.view.LayoutInflater.inflate(LayoutInflater.java:394) at android.view.LayoutInflater.inflate(LayoutInflater.java:352) at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251) at android.app.Activity.setContentView(Activity.java:1862) at idev.android.soulspotter.Login.onCreate(Login.java:57) at android.app.Activity.performCreate(Activity.java:4492) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920) ... 11 more
Please give me solution.
line no 57
inLogin
class – KaushiksetContentView(R.layout.login_large);
– Sagar Zalaxml's name
of urres/layout
folder – Kaushik