0
java.lang.NoSuchMethodError: com.parse.ParseObject.getClassName
at com.parse.ParseQueryAdapter.<init>(ParseQueryAdapter.java:179)

After migrating from parse platform to parse open server on heroku I updated the dependency to newer parse SDK to allow server url in parse initialization, app/build.gradle now has

compile 'com.parse.bolts:bolts-android:1.4.0'
    compile 'com.parse:parse-android:1.13.0'

i tried manually compiling the parse libraries from the jar compile files('libs/Parse-1.13.0.jar') but this results in error

Process 'command 'C:\Program Files\Java\jdk1.7.0_71\bin\java.exe' finished with non-zero exit value 2

and even tried setting multiDexEnabled true but this results in another error

Error:Execution failed for task ':app:packageAllDebugClassesForMultiDex'. > java.util.zip.ZipException: duplicate entry: com/parse/AbstractQueryController$1.class 

build.gradle

apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.1"
defaultConfig {
    applicationId "com.example.app"
    minSdkVersion 15
    targetSdkVersion 23
    versionCode 1
    versionName "1.0"

    // Enabling multidex support.
    //multiDexEnabled true


}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
    debug {
        debuggable true
    }
}

repositories {
    mavenCentral()
}

}

dependencies {

testCompile 'junit:junit:4.12'

compile 'com.parse.bolts:bolts-android:1.4.0'
compile 'com.parse:parse-android:1.13.0'

compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
compile 'com.github.dmytrodanylyk.android-process-button:library:1.0.4'
compile 'com.parse:parseui-widget-android:0.0.1'
compile 'com.google.android.gms:play-services-maps:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.android.gms:play-services-location:8.4.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.parse:parsefacebookutils-v4-android:1.10.3@aar'

}

6
  • show your build.gradle Commented Aug 3, 2016 at 8:41
  • 1
    @IntelliJAmiya build.gradle added Commented Aug 3, 2016 at 8:46
  • call compile 'com.parse:parse-android:1.12.0' Commented Aug 3, 2016 at 8:48
  • @IntelliJAmiya that results in error (because you need 1.13.0 the newer parse SDK to allow server url in parse initialization) : cannot find symbol .server("myapp.herokuapp.com/parse/") // The trailing slash is important. ^ symbol: method server(String) location: class Builder Commented Aug 3, 2016 at 8:52
  • compile 'com.parse:parse-android:1.13.1' Commented Aug 3, 2016 at 8:57

1 Answer 1

1

got past this issue by changing

mainAdapter = new ParseQueryAdapter<ParseObject>(this, Todo.class);

to

mainAdapter = new ParseQueryAdapter<ParseObject>(this, "Todo");

error was pointing to ParseUI-Widget/src/main/java/com/parse/ParseQueryAdapter.java

public ParseQueryAdapter(Context context, Class<? extends ParseObject> clazz) {
this(context, ParseObject.getClassName(clazz));

}

at getClassName it said Non-Static method cannot be referenced from a static context

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

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.