我正在使用Android Studio(最新版本)来开发我的应用。我使用Parse作为后端解决方案。一切顺利,直到我发现解析有新的版本,我想从 Parse-1.7.1.jar 升级到 Parse-1.8.3.jar (< em>最新版本)。 既然parse现在使用Bolts lib我也添加了这样的库:
compile 'com.parse.bolts:bolts-android:1.1.4'
Parse.initialize();
另外我使用facebook-sdk不知道这是否必须对这个烂摊子做任何事情。
我在我的应用程序onCreate方法中得到的就是这个错误
03-08 22:07:05.841 24519-24533/ant.flow E/dalvikvm﹕ Could not find class 'bolts.Task$TaskCompletionSource', referenced from method com.parse.ParsePinningEventuallyQueue.waitForOperationSetAndEventuallyPin
03-08 22:07:05.841 24519-24519/ant.flow E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: ant.flow, PID: 24519
java.lang.NoClassDefFoundError: bolts.BoltsExecutors
at bolts.Task.<clinit>(Task.java:31)
at com.parse.ParseSQLiteDatabase.<init>(ParseSQLiteDatabase.java:45)
at com.parse.ParseSQLiteDatabase.openDatabaseAsync(ParseSQLiteDatabase.java:33)
at com.parse.ParseSQLiteOpenHelper.getDatabaseAsync(ParseSQLiteOpenHelper.java:43)
at com.parse.ParseSQLiteOpenHelper.getWritableDatabaseAsync(ParseSQLiteOpenHelper.java:39)
at com.parse.OfflineStore.findAsync(OfflineStore.java:390)
at com.parse.OfflineStore.findAsync(OfflineStore.java:354)
at com.parse.ParsePin.getParsePin(ParsePin.java:22)
at com.parse.ParseQuery.countFromLocalDatastoreAsync(ParseQuery.java:885)
at com.parse.ParseQuery.access$1700(ParseQuery.java:78)
at com.parse.ParseQuery$22.call(ParseQuery.java:1132)
at com.parse.ParseQuery$22.call(ParseQuery.java:1128)
at com.parse.ParseQuery.doWithRunningCheck(ParseQuery.java:912)
at com.parse.ParseQuery.countInBackground(ParseQuery.java:1128)
at com.parse.ParseInstallation.hasCurrentInstallationAsync(ParseInstallation.java:88)
at com.parse.GcmRegistrar.updateAsync(GcmRegistrar.java:96)
at com.parse.Parse.initialize(Parse.java:240)
at ant.flow.SocialApplication.onCreate(SocialApplication.java:33)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1025)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4581)
at android.app.ActivityThread.access$1600(ActivityThread.java:161)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1325)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:157)
at android.app.ActivityThread.main(ActivityThread.java:5356)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1265)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1081)
at dalvik.system.NativeStart.main(Native Method)