0

I have an app that has many dependencies "Unable to execute dex: method ID not in [0, 0xffff]: 65536" after update repositories.

Then, I found the solution here.

However, after follow those instructions, I started getting the error "Gradle DSL method not found: 'multiDexEnabled()".

Then, I found that the solution was to update gradle, by adding "classpath.'com.android.tools.build:gradle:0.14.0'" to dependencies.

Then, I started getting the error "Unsupported method: SourceProvider.getJniDirectories()", and I found many posts saying that the solution is to set gradle back to "0.13.+".

But, gradle 0.13.+ doesn't recognise multiDexEnabled and shows my first error "Gradle DSL method not found: 'multiDexEnabled()'".

I need to use multiDex because of the many dependencies I use and also I use Jni. So, one solution breaks the other one.

[UPDATE] A information that can help: I migrated my project from Eclipse to Android Studio because I didn't find a solution for multidex on Eclipse.

Has anyone had same problem? Is there a solution for that?

Thanks!

Snicolas
  • 37,840
  • 15
  • 114
  • 173
fcberg
  • 764
  • 13
  • 29

1 Answers1

3

Just update your Android Studio to 9.+ version. Try Help - Check for update. If no one update was found switch to the Canary channel (Help - Check for update - Updates).

  • Mmm, I think it's because I'm using a Mac version. https://developer.android.com/sdk/installing/studio.html, it has not support for NDK... There's no update to 9.+ for Mac... :(... Does anyone know a solution to use multiDex on Eclipse? – fcberg Nov 20 '14 at 12:17
  • Sorry, I just saw you wrote to switch to Canary channel. I found the update. Installing.. – fcberg Nov 20 '14 at 12:26