I want to upgrade gradle to 2.0.0-beta or 1.5.0, I have the dex plugin in my gradle at the moment, but even when I removed it I was still getting the same error. How do I properly get rid of the multidex dependency
Error:Access to the dex task is now impossible, starting with 1.4.0 1.4.0 introduces a new Transform API allowing manipulation of the .class files. See more information: http://tools.android.com/tech-docs/new-build-system/transform-api
build.gradle More info on multidex
android { compileSdkVersion 21 buildToolsVersion "21.1.0" defaultConfig { ... minSdkVersion 14 targetSdkVersion 21 ... // Enabling multidex support. multiDexEnabled true } ... } dependencies { compile 'com.android.support:multidex:1.0.0' }
The Transform API doesn't give too much info. Is there any to get this work or any examples how to use the transform api, anything at all?
I know it works with 1.3.0, I need at least 1.5.0
2 Answers
Answers 1
At the project level build.gradle
, put this (or whatever version you need)
dependencies { classpath 'com.android.tools.build:gradle:1.5.0' }
As far as
How do I properly get rid of the multidex dependency?
You need to remove all references to multidex in the Gradle files, then sync Gradle and clean and rebuild the project
Answers 2
I'm not sure if it's going to help. I got a similar error and I deleted the directory which contained that dex file. The path was C:\Users\user\AndroidStudioProjects\AppName\app\build\intermediates\builds\debug\37393618208634. After deleting that directory it worked. You can try this if that does't work you can just put it back. I hope this helps.
0 comments:
Post a Comment