0

I've just finished working on my android app and I run it in android studio emulator. It's fine and everything works well, but I have an issue - when I want to generate signed apk , I got these two errors and can't complete apk building process. I've tried a lot of things to solve these two errors that i got, but no result.

Error screenshot

bartektartanus
  • 15,284
  • 6
  • 74
  • 102
ops
  • 11
  • 3

2 Answers2

2

You've hit the 64K method limit.

Check if you've added unnecessary dependencies, check your ProGuard configuration.

Follow the instructions from the documentation

Ognian Gloushkov
  • 2,669
  • 1
  • 20
  • 35
  • after i did these steps , i got more than 2 errors and they are deferent than what i got before ,.... – ops Feb 19 '17 at 09:46
  • after i did these steps , i got more than 2 errors and they are different than what i got before , https://www.photobox.co.uk/slideshow?album_id=4730712146 – ops Feb 19 '17 at 10:04
1

Enable multiDex, do that in your build.gradle file, in defaultConfig block

And if your minSdkVersion < 21 then also add multidex support library in your dependencies block

android {

    defaultConfig {
        ...

        multiDexEnabled true // add this line

    }
    ...
}

dependencies {
   ...

  compile 'com.android.support:multidex:1.0.1' //If minSdkVersion < 21

}
Atef Hares
  • 4,715
  • 3
  • 29
  • 61