1

I am having a problem with codename one build for android ,

Dex: The number of method references in a .dex file cannot exceed 64K. Learn how to resolve this issue at https://developer.android.com/tools/building/multidex.html trouble writing output: Too many method references: 67801; max is 65536.

is there any build hint that I can use to overcome this issue ??

AhMaD AbUIeSa
  • 805
  • 1
  • 12
  • 21

1 Answers1

2

Remove some libraries or add to app/build.gradle

android {

...

defaultConfig {
           multiDexEnabled = true
}
...
}

With Codename One you need to add the following build hints to your project:

android.gradle=true 
android.multidex=true
Yu Jiaao
  • 4,444
  • 5
  • 44
  • 57
  • thanks but I don't have build.gradle in codename one [ I have build.properties ] which is used by build hints that injects to android manifest – AhMaD AbUIeSa Mar 19 '17 at 08:24
  • These are build hints. The `android.gradle` is `true` by default but the multidex is not so adding that will solve your issue – Shai Almog Mar 20 '17 at 05:06