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
- added multiDexEnabled true
- added preDexLibraries false
- playing around with all other dex options
- also I tried this: Android dx tool
- this: Android Studio ignore --core-library flag
- and set the --core-library flag in Android Studio settings
Why they are not working
- solution: I modified my dx.bat in every build-tool I have .. nothing changed. It's just not working
- solution: com.android.build.gradle.tasks.Dex is not known (and I have no idea how to add), coreLibrary is not supported with Gradle 1.5
- solution: is completely ignored by gradle
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