I have a problem with my Android project and Gradle 1.5. I am not able to compile my dependencies I added. Currently I am developing an Java EE application and I want to perform an EJB lookup from my Android device to my running Wildfly10.
I know, doing a lookup from an android device might not be the best option, a REST webservice would be better, but thats not the point here.
In my project I added a new module, containing all my external libs, and I added this module to my :app as dependency on "compile" level. Everything just works fine, until I want to add the jboss-client.jar. During dex, he is complaining about the javax.transaction.*.
What I have done for now
Why they are not working
The projects minSDK is 19 and targetSDK is 23 with build-tool 23.0.2 I called the dx.bat from command-line with the same parameters as gradle, I only added the --core-library arg and it works! But that doesnt solve the problem within Android Studio and Gradle.
Can anyone please help me?
UPDATE: Okay, I had a look at the source code of com.android.dx.command.Main. There is a public inner class "Arguments" which contains (apperently) the arguments which can be used, also the coreLibrary=false. Now I only need to know how to modify it. Does anybody know?
Best regards, Chris
The Mapbox Core Libraries for Android are a set of utilities that help you with permissions, device location, and connectivity within your Android project. With these libraries, you can: Check for, request, and respond to any number of Android system permissions such as device location or camera.
Open your project in Android Studio and select File > Settings... > Build, Execution, Deployment > Build Tools > Gradle (Android Studio > Preferences... > Build, Execution, Deployment > Build Tools > Gradle on a Mac).
This worked for me:
dexOptions {
preDexLibraries = false
additionalParameters =["--core-library"]
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With