我開始爲我的小遊戲使用Google Play服務。像導遊說的,我在我的build.gradle(Module: app)
中加入了compile 'com.google.android.gms:play-services:9.4.0'
。無法使用'com.google.android.gms:play-services:9.4.0'創建APK'
由於該更改,我無法構建我的apk,但我仍然可以在手機上運行它。我得到以下錯誤,而建設的APK:
Error:Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:transformClassesWithDexForDebug'. com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536 Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
感謝
可以通過導入完整庫發生,您應該從谷歌只需要進口玩類的lib。在表1中列出了哪些部分可用:https://developers.google.com/android/guides/setup – Opiatefuchs