2013-05-17 92 views
-1

我有我的地圖V2和所有設置的播放服務,一切正常。在ADT更新到v22之後,Eclipse開始嚇壞了,在jar不匹配的時候出現各種各樣的錯誤,什麼都沒有,所以我繞了一下。谷歌地圖V2/Google Play服務NoClassDefFoundError

現在開始我的應用程序時,我得到了以下錯誤:

05-17 14:58:38.780: E/AndroidRuntime(19908): java.lang.ExceptionInInitializerError 
05-17 14:58:38.780: E/AndroidRuntime(19908): at java.lang.Class.newInstanceImpl(Native Method) 
05-17 14:58:38.780: E/AndroidRuntime(19908): at java.lang.Class.newInstance(Class.java:1319) 
05-17 14:58:38.780: E/AndroidRuntime(19908): at android.app.Instrumentation.newApplication(Instrumentation.java:983) 
05-17 14:58:38.780: E/AndroidRuntime(19908): at android.app.Instrumentation.newApplication(Instrumentation.java:968) 
05-17 14:58:38.780: E/AndroidRuntime(19908): at android.app.LoadedApk.makeApplication(LoadedApk.java:499) 
05-17 14:58:38.780: E/AndroidRuntime(19908): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4364) 
05-17 14:58:38.780: E/AndroidRuntime(19908): at android.app.ActivityThread.access$1300(ActivityThread.java:141) 
05-17 14:58:38.780: E/AndroidRuntime(19908): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1294) 
05-17 14:58:38.780: E/AndroidRuntime(19908): at android.os.Handler.dispatchMessage(Handler.java:99) 
05-17 14:58:38.780: E/AndroidRuntime(19908): at android.os.Looper.loop(Looper.java:137) 
05-17 14:58:38.780: E/AndroidRuntime(19908): at android.app.ActivityThread.main(ActivityThread.java:5041) 
05-17 14:58:38.780: E/AndroidRuntime(19908): at java.lang.reflect.Method.invokeNative(Native Method) 
05-17 14:58:38.780: E/AndroidRuntime(19908): at java.lang.reflect.Method.invoke(Method.java:511) 
05-17 14:58:38.780: E/AndroidRuntime(19908): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793) 
05-17 14:58:38.780: E/AndroidRuntime(19908): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560) 
05-17 14:58:38.780: E/AndroidRuntime(19908): at dalvik.system.NativeStart.main(Native Method) 
05-17 14:58:38.780: E/AndroidRuntime(19908): Caused by: java.lang.NoClassDefFoundError: com.google.android.gms.maps.model.CameraPosition$Builder 
05-17 14:58:38.780: E/AndroidRuntime(19908): at com.example.myapp.GlobalApp.<clinit>(GlobalApp.java:113) 

我有谷歌Play服務庫導入和使用谷歌作爲建議只是參考。我在libs文件夾中試過並且沒有google-play-services.jar,沒有區別。 Eclipse不會給我的項目編譯錯誤。這可能是什麼原因?

enter image description here

+0

可能重複http://stackoverflow.com檢查一切/ questions/16603002/classnotfoundexception-on-androidannotations-generated-classes-since-update-to-a) – Selvin

+0

[圖書館在升級到ADT 22後不會再被添加到APK](http://stackoverflow.com/questions-16596969 /庫-do-not-get-added-to-apk-any-after-upgrade-to-adt-22) – CommonsWare

回答

2

轉到項目的Java構建路徑屬性和從訂單和出口

的[上AndroidAnnotations ClassNotFoundException的產生,因爲更新類ADT 22](
+0

然後將playservices.jar添加到Java版本路徑解決了它。非常感謝你=) – FWeigl