The issue I have is that I have an existing project that depends on Parse. My question is how do I integrate Adobe CreativeSDKImage because it extends MultiDexApplication whereas Parse Application (Class) extends Application.
Existing Project e.g (MyApp extends Application ) import android.app.Application;
CreativeSDK based on ADOBE CREATIVE SDK IMAGE GUIDE e.g (CreativeSDKImageSampleApp extends) import android.support.multidex.MultiDexApplication;
After hours of trying to figure out why my app now crashes everytime it starts-up, I noticed Parse.initilize is the issue or perhaps correct me if I'm wrong, as I also suspect extends MultiDexApplication might be the cause. I read limitations of using MultiDexApplication here for your reference; BUILDING MULTIDEX
So please look at the code below to help me in the integration of Parse with CreativeSDKImage Application.
package com.aviary.android.sample;
import android.support.multidex.MultiDexApplication;
import com.aviary.android.feather.sdk.IAviaryClientCredentials;
import com.parse.Parse;
import com.parse.ParseACL;
import com.parse.ParseUser;
public class MyApplication extends MultiDexApplication implements IAviaryClientCredentials {
@Override
public void onCreate() {
super.onCreate();
init();
}
private void init() {
Parse.enableLocalDatastore(getApplicationContext());
Parse.initialize(this);
ParseUser.enableAutomaticUser();
ParseACL defaultACL = new ParseACL();
ParseACL.setDefaultACL(defaultACL, true);
}
@Override
public String getBillingKey() {
return "";
}
@Override
public String getClientID() {
return "YOUR CLIENT ID";
}
@Override
public String getClientSecret() {
return "YOUR CLIENT SECRET";
}
}
I am getting this error when I run the code;
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: FATAL EXCEPTION: main
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: Process: com.aviary.android.sample, PID: 3700
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: java.lang.NoSuchMethodError: No virtual method setFollowRedirects(Z)V in class Lcom/squareup/okhttp/OkHttpClient; or its super classes (declaration of 'com.squareup.okhttp.OkHttpClient' appears in /data/app/com.aviary.android.sample-1/base.apk)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at com.parse.ParseOkHttpClient.<init>(ParseOkHttpClient.java:58)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at com.parse.ParseHttpClient.createClient(ParseHttpClient.java:45)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at com.parse.ParsePlugins$Android.newHttpClient(ParsePlugins.java:175)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at com.parse.ParsePlugins.restClient(ParsePlugins.java:91)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at com.parse.Parse.initialize(Parse.java:196)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at com.parse.Parse.initialize(Parse.java:161)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at com.aviary.android.sample.MyApplication.init(MyApplication.java:22)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at com.aviary.android.sample.MyApplication.onCreate(MyApplication.java:14)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4707)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at android.app.ActivityThread.-wrap1(ActivityThread.java)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1405)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-29 16:09:56.741 3700-3700/? E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-29 16:0