2012-09-13 57 views
0

好,我觉得很奇怪,对于Android的应用程序工作在模拟器很好..应用程序崩溃报告,但在模拟器

但在实际的设备,它崩溃并提供以下错误(通过开发者控制台):

java.lang.Error: Unresolved compilation problem: 
The import com.recipes cannot be resolved 

at com.etraks.mauritianrecipes.app.SplashScreen.<init>(SplashScreen.java:3) 
at java.lang.Class.newInstanceImpl(Native Method) 
at java.lang.Class.newInstance(Class.java:1319) 
at android.app.Instrumentation.newActivity(Instrumentation.java:1027) 
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1885) 
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1995) 
at android.app.ActivityThread.access$600(ActivityThread.java:128) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1161) 
at android.os.Handler.dispatchMessage(Handler.java:99) 
at android.os.Looper.loop(Looper.java:137) 
at android.app.ActivityThread.main(ActivityThread.java:4517) 
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:993) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:760) 
at dalvik.system.NativeStart.main(Native Method) 

我的问题是为什么这样的崩溃不会发生在模拟器上?

+0

请您尝试卸载前一个,然后重新安装。 – RobinHood

+0

http://stackoverflow.com/questions/4497076/unable-to-run-imported-project可能的重复 –

回答

0

如果您在jar文件中导入com.recipes,请转至properties-> javabuildpath-> order并导出。如果还没有包含jar文件,请在此处添加jar文件(将其标记为已选中)。

相关问题