0

I'm migrating my android app from Parse android sdk 1.8.1 to 1.13.0. So i can point my app to my hosted Parse server but when i replace the old Parse-1.8.1 to new Parse-1.13.0 library and update the server details in the app. App crash as soon as i run it.

When app crash it shows me below error message in log

03-31 13:55:37.196    2247-2247/? E/AndroidRuntime﹕ FATAL EXCEPTION: main
Process: com.name.appname, PID: 2247
java.lang.NoClassDefFoundError: bolts.TaskCompletionSource
        at com.parse.ParseTaskUtils.callbackOnMainThreadAsync(ParseTaskUtils.java:100)
        at com.parse.ParseTaskUtils.callbackOnMainThreadAsync(ParseTaskUtils.java:87)
        at com.parse.ParseQuery.findInBackground(ParseQuery.java:1211)
        at com.ccna.practicequiz.QuizApplication.onCreate(QuizApplication.java:80)
        at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1007)
        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4344)
        at android.app.ActivityThread.access$1500(ActivityThread.java:135)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:136)
        at android.app.ActivityThread.main(ActivityThread.java:5017)
        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:779)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:595)
        at dalvik.system.NativeStart.main(Native Method)

Dependencies

dependencies {
    compile files('libs/Parse-1.13.0.jar')
    compile files('libs/bolts-android-1.1.4.jar')
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:cardview-v7:+'
    compile 'com.android.support:appcompat-v7:23.0.1'
    compile 'com.google.android.gms:play-services:8.1.0'
}

Changes in the app to point app to hosted server

  //Parse.initialize(this, "<key>", "<key>");
    Parse.initialize(new Parse.Configuration.Builder(getApplicationContext())
            .applicationId("appid")
            .clientKey("<random key>")
            .server("http://192.168.1.177:1337/parse/")   // '/' important after 'parse'
            .build());

App is working fine if i use the old Parse-1.8.1 library.I already tried cleaning jar by doing 'gradlew clean jarRelease' and 'gradlew clean testDebug' files still no luck

1
  • try to use SDK 1.13 and still use parse.com, If you will successfully connect you can go and debug your own parse server... this seems you got problem with the SDK implementation Commented Mar 31, 2016 at 19:02

2 Answers 2

1

You might need to update your JAR files, but why use JAR files when you could just grab the dependencies with Gradle?

dependencies {
    compile 'com.parse.bolts:bolts-android:1.+'
    compile 'com.parse:parse-android:1.+'
}

Also, Play Services is currently 8.4.0 and unless you actually need all the Play Services, then it is recommended to just pick the dependencies you really use.

Sign up to request clarification or add additional context in comments.

Comments

0

You have to upgrade bolts-android-1.1.4.jar to the latest version: 1.4.0

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.