I have run into the 64K method limit while building chrome_public_test_apk. I added enable_multidex=true to the instrumentation_test_apk("chrome_public_test_apk") rule in chorme/Android/BUILD.gn, which solved the problem for release builds. However, in a debug build, I am getting a related error:
FAILED: gen/chrome/android/chrome_public_test_apk__apk/classes.dex.zip
python ../../build/android/gyp/dex.py --depfile gen/chrome/android/chrome_public_test_apk__apk__final_dex.d --android-sdk-tools ../../third_party/android_tools/sdk/build-tools/24.0.2 --dex-path gen/chrome/android/chrome_public_test_apk__apk/classes.dex.zip --incremental --multi-dex --main-dex-list-path gen/chrome/android/chrome_public_test_apk__apk/classes.dex.zip.main_dex_list --inputs=@FileArg\(gen/chrome/android/chrome_public_test_apk__apk.build_config:dist_jar:dependency_jars\) gen/chrome/android/chrome_public_test_apk__apk/chrome_public_test_apk__apk.jar
... Snipped ...
UNEXPECTED TOP-LEVEL EXCEPTION:
com.android.dex.DexException: Too many classes in --main-dex-list, main dex capacity exceeded
Some quick googlin suggested that I change the minSdk to 1 or use proguard, but the general rule in Chromium seems to be that proguard is not used for debug builds. In most of the manifests the minimum SDK is set to 16, so I'm not sure that is the right answer either.
Any advice will be appreciated
- Kevin
Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.