Android Marshmallow

android

#1

Accordingly to the changelog, version 3.13 add support for android M. My app is targeting 23 and compiling against 23, and the build is failing because mobup-volley, a gradle dependency, is still using Apache. I did also notice that the mobup sdk gradle is still targeting 22 and compiling against 22.

Another thing that I noticed is that the build.gradle still have as dependency

classpath 'org.robolectric:robolectric-gradle-plugin:1.1.0'

which is preventing me to use

    classpath 'com.android.tools.build:gradle:1.3.1'

which would allow me to use

 useLibrary 'org.apache.http.legacy'

am I missing something obvious here?

The building is failing with

arning: com.facebook.ads.internal.http.a$a: can’t find referenced field ‘org.apache.http.HttpEntity wrappedEntity’ in program class com.facebook.ads.internal.http.a$a
Warning: com.mopub.volley.toolbox.HttpClientStack: can’t find referenced method ‘void addHeader(java.lang.String,java.lang.String)’ in program class com.mopub.volley.toolbox.HttpClientStack$HttpPatch
Warning: com.mopub.volley.toolbox.HttpClientStack$HttpPatch: can’t find referenced method ‘void setURI(java.net.URI)’ in program class com.mopub.volley.toolbox.HttpClientStack$HttpPatch
Warning: com.mopub.volley.toolbox.Volley: can’t find referenced class android.net.http.AndroidHttpClient
Warning: com.mopub.volley.toolbox.Volley: can’t find referenced class android.net.http.AndroidHttpClient

Thanks


#2

Hello!

You’re right, Eclipse and Maven users will need to get org.apache.http classes on their classpath if they’re building the SDK from source against API 23. The org.apache.http.legacy.jar lives in $ANDROID_HOME/platforms/android-23/optional. You can install that JAR in your local maven repo and add a dependency.

This is our suggested approach for Android M developers until we remove the apache dependency.

Let us know if you have any more questions or if this doesn’t work for you!

Laura
Solutions Engineer, Twitter-MoPub