cancel
Showing results for 
Search instead for 
Did you mean: 

Android sdk failure

I try to integrate authorize android sdk with my mobile android application.
I have
compileSdkVersion 25
minSdkVersion 19 (when tested, I temporarily changed it to 21 but I got the same errors that with 19)
targetSdkVersion 25

I added in gradle:
compile 'net.authorize:anet-java-sdk:1.9.5'


and create class with test code which I took from your page:
//Common code to set for all requests
ApiOperationBase.setEnvironment(Environment.SANDBOX);
.........

 

Then I tried to run application to check authorize.net.

First I get:
Error:Execution failed for task ':app:transformResourcesWithMergeJavaResForDebug'.
> More than one file was found with OS independent path 'META-INF/DEPENDENCIES'

 

so, I added this to gradle:


packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}

The android app started and I launched test code with my login.
And when was executing this line of sample code:
controller.execute();


I got:
E/HttpUtility: Execution error for http post Message: 'java.lang.NoClassDefFoundError: Failed resolution of: Ljavax/xml/bind/JAXBContext;'

 

Later I tried to add some JAXB libraries but i got different other errors with JAXB.

 

What to do?

AlexeyS8
Member
0 REPLIES 0