Error java.lang.ClassNotFoundException, PathClassLoader.findClass() android

Go To StackoverFlow.com

1

My project work ok on the emulator. But hardware show me that i make some mistake. I get something like that from stack report. I was looking for solution of this problem and i found hint to add all used libraries to manifest, but it doesn t help me anyway.

java.lang.RuntimeException: Unable to start activity ComponentInfo{your.modlitewnik/your.modlitewnik.ModlitewnikActivity}: android.view.InflateException: Binary XML file line #42: Error inflating class android.widget.Space
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1659)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675)
at android.app.ActivityThread.access$1500(ActivityThread.java:121)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3701)
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:862)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:620)
at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #42: Error inflating class android.widget.Space
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:623)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:626)
at android.view.LayoutInflater.inflate(LayoutInflater.java:408)
at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
at android.app.Activity.setContentView(Activity.java:1657)
at your.modlitewnik.ModlitewnikActivity.onCreate(ModlitewnikActivity.java:15)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1623)
... 11 more
Caused by: java.lang.ClassNotFoundException: android.widget.Space in loader dalvik.system.PathClassLoader[/data/app/your.modlitewnik-1.apk]
at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
at android.view.LayoutInflater.createView(LayoutInflater.java:471)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:570)
2012-04-03 21:22
by mathewM


0

You are trying to use an API Level 14 class, android.widget.Space, on a phone that does not support it. So unless your phone is running Ice Cream Sandwich it will not run. It probably works in your emulator because you have specified an emulator using API Level 14 or 15.

2012-04-03 21:26
by onit
Right I remove this, hope that will work now - mathewM 2012-04-03 21:34