2017-02-28 14 views
-4

私はあなたがアンドロイドスタジオでGoogleマップを使用する方法に興味がありました。私はチュートリアルに続いて、私は三重のすべてが正しく入力されたことが確認されたが、私は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

+1

コンパイルされたコードの中にメソッドが多すぎることを意味します。 DexIndexOverflowExceptionでインターネット検索をしようとする... DexIndexOverflowExceptionとGoogleの両方のサービスでインターネット検索を行うともっと興味深い結果が返ってくるだろう... – Selvin

答えて

2

I was interested in how you can use google maps in android studio

使用この

compile 'com.google.android.gms:play-services-maps:10.2.0' 

の代わりに、この

compile 'com.google.android.gms:play-services:10.2.0' 

あなたはMORをしたい場合あなたがそこに行く場合のみsee here

をマッピングし、より電子Googleがサービスを再生、(強調鉱山)

If the number of method references in your app exceeds the 65K limit, your app may fail to compile. You may be able to mitigate this problem when compiling your app by specifying only the specific Google Play services APIs your app uses, instead of all of them

0

あなただけのGoogleは、使用しているサービスAPIを果たして追加していることを確認し

をお読みください。あなたの場合、マップのみが必要なので、これを使用してください:

com.google.android.gms:play-services-maps:10.2.0 

パッケージ全体を追加する代わりに、第2の選択肢は、マルチデックスを可能にすることである。マルチデックスを有効にする方法については、https://developer.android.com/studio/build/multidex.htmlのリンクをご利用ください。

関連する問題