2012-04-03 38 views
1

我的項目在模擬器上正常工作。但硬件告訴我,我犯了一些錯誤。我從堆棧報告中得到類似的東西。我正在尋找這個問題的解決方案,我發現提示將所有使用的庫添加到清單中,但它無法幫助我。錯誤java.lang.ClassNotFoundException,PathClassLoader.findClass()android

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) 

回答

0

您試圖在不支持它的手機上使用API​​ Level 14類android.widget.Space。所以除非你的手機在運行冰淇淋三明治,否則它不會運行。它可能在你的模擬器中工作,因爲你已經指定了一個使用API​​ Level 14或15的模擬器。

+0

Right我刪除了這個,希望現在可以工作。 – mathewM 2012-04-03 21:34:40

相關問題