我刚刚下载了iosched个应用,以调查它如何处理手机和平板电脑布局之间的切换:
我使用了EGit并且出现了错误: Android需要编译器合规性级别5.0或6.0。找到'1.6'
由于this问题和Ted Hopp的回答,我轻松地修复了它。
现在项目编译了,但是一开始就崩溃了:
07-11 02:23:37.266:E / AndroidRuntime(1881):致命异常:主要 07-11 02:23:37.266:E / AndroidRuntime(1881): java.lang.RuntimeException:无法获取提供者 com.google.android.apps.iosched.provider.ScheduleProvider: 抛出java.lang.ClassNotFoundException: com.google.android.apps.iosched.provider.ScheduleProvider在loader中 dalvik.system.PathClassLoader [/data/app/com.google.android.apps.iosched-1.apk] 07-11 02:23:37.266:E / AndroidRuntime(1881):at android.app.ActivityThread.installProvider(ActivityThread.java:3865) 07-11 02:23:37.266:E / AndroidRuntime(1881):at android.app.ActivityThread.installContentProviders(ActivityThread.java:3617) 07-11 02:23:37.266:E / AndroidRuntime(1881):at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3573) 07-11 02:23:37.266:E / AndroidRuntime(1881):at android.app.ActivityThread.access $ 2200(ActivityThread.java:123)07-11 02:23:37.266:E / AndroidRuntime(1881):at android.app.ActivityThread $ H.handleMessage(ActivityThread.java:1031) 07-11 02:23:37.266:E / AndroidRuntime(1881):at android.os.Handler.dispatchMessage(Handler.java:99)07-11 02:23:37.266:E / AndroidRuntime(1881):at android.os.Looper.loop(Looper.java:126)07-11 02:23:37.266: E / AndroidRuntime(1881):at android.app.ActivityThread.main(ActivityThread.java:3997)07-11 02:23:37.266:E / AndroidRuntime(1881):at java.lang.reflect.Method.invokeNative(Native Method)07-11 02:23:37.266:E / AndroidRuntime(1881):at java.lang.reflect.Method.invoke(Method.java:491)07-11 02:23:37.266: E / AndroidRuntime(1881):at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run(ZygoteInit.java:841) 07-11 02:23:37.266:E / AndroidRuntime(1881):at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:599)07-11 02:23:37.266:E / AndroidRuntime(1881):at dalvik.system.NativeStart.main(Native Method)07-11 02:23:37.266: E / AndroidRuntime(1881):引起:java.lang.ClassNotFoundException: com.google.android.apps.iosched.provider.ScheduleProvider在loader中 dalvik.system.PathClassLoader [/data/app/com.google.android.apps.iosched-1.apk] 07-11 02:23:37.266:E / AndroidRuntime(1881):at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:251) 07-11 02:23:37.266:E / AndroidRuntime(1881):at java.lang.ClassLoader.loadClass(ClassLoader.java:548)07-11 02:23:37.266:E / AndroidRuntime(1881):at java.lang.ClassLoader.loadClass(ClassLoader.java:508)07-11 02:23:37.266:E / AndroidRuntime(1881):at android.app.ActivityThread.installProvider(ActivityThread.java:3850) 07-11 02:23:37.266:E / AndroidRuntime(1881):... 12更多
我可以在项目中看到此类 com.google.android.apps.iosched.provider.ScheduleProvider 。你能帮我解决这个问题吗?
答案 0 :(得分:2)
判断"我使用了EGit,那里"你最有可能使用eclipse。我担心该项目是在/为Android Studio创建的,尝试在eclipse中设置它会非常痛苦 - 我浪费了几个小时试着没有运气......最后我放弃并安装了Android Studio。为了能够运行,需要将20多个额外的库添加到项目中。 我有几个免费的小时,所以我会尝试Android Studio,但谷歌人可能不得不在项目页面警告我们该项目不会在eclipse中运行... (当然项目根目录中有一个BUILDING.txt)