Java – Android studio – gradle 1.5 – core library options
There is a problem with my android project and gradle 1.5
I know that searching from Android devices may not be the best choice. Rest web service will be better, but that's not the point
In my project, I added a new module containing all external libraries and added this module to my application as a dependent "compile" level Everything is fine until I want to add JBoss client jar. While in dex, he was complaining about javax transaction.*.
What have I done now
>Add multidexenabled true > add predexlibraries error > play all other DEX Options > I've also tried this: Android DX tool > this: Android studio ignore – core library flag > and set the – core library flag in Android studio settings
Why don't they work
>> solution: I modified my DX Bat in every build tool I haven't changed It's just no job
>> solution: com android. build. gradle. tasks. DEX is unknown (I don't know how to add it), and corelibrary doesn't support gradle 1.5
>Solution: graduation is completely ignored
The project minsdk is 19, the targetsdk is 23, and the build tool is 23.0 2 I call DX from the command line with the same parameters as gradle Bat, I only added - core library Arg, its working principle! But this does not solve the problems in Android studio and gradle
Can someone help me?
Update: OK, I looked at com android. dx. command. Main source code There is a public inner class "arguments", which contains (can be used) parameters that can be used. It is also corelibrary = false Now I just need to know how to modify it Does anyone know
Best wishes, Chris
Solution
This works for me:
dexOptions { preDexLibraries = false additionalParameters =["--core-library"] }