Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 索引异常-我可以';无法解决_Java_Android_Android Studio_Android Service - Fatal编程技术网

Java 索引异常-我可以';无法解决

Java 索引异常-我可以';无法解决,java,android,android-studio,android-service,Java,Android,Android Studio,Android Service,我有这个错误,我不能解决它,我正在寻找interhet,但没有工作 Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzzf; 错误:任务“:app:transformClassesWithDexForDebug”的执行失败 com.android.build.api.tr

我有这个错误,我不能解决它,我正在寻找interhet,但没有工作

Error:Error converting bytecode to dex:
Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzzf;
错误:任务“:app:transformClassesWithDexForDebug”的执行失败

com.android.build.api.transform.TransformException:com.android.ide.common.process.ProcessException:java.util.concurrent.ExecutionException:java.lang.UnsupportedOperationException


启动应用程序时显示错误。如果重建项目,一切正常,但运行项目时

您同时拥有10.0.1版和9.0.0版的“com.google.firebase:firebase广告”。

删除10.0.1版本,因为其他所有版本都是9.0.0,它们应该始终具有相同的版本。

这可能会有很多问题,但我相信这与多重索引相关。您正在为项目启用多重索引,这没关系,但这需要多重索引支持库能够在Lolliopop之前工作

请将此添加到您的依赖项中

  compile 'com.android.support:multidex:1.0.1'

您有多个重复版本的库,只保留您需要的内容,而不保留任何额外内容,即使在删除重复库后,您也会遇到此错误,然后尝试启用multidex

    android {
compileSdkVersion 21
buildToolsVersion "21.1.0"

defaultConfig {
    ...
    minSdkVersion 14
    targetSdkVersion 21
    ...

    // Enabling multidex support.
    multiDexEnabled true
}
...
}

dependencies {
compile 'com.android.support:multidex:1.0.0'
}
在应用程序标记内的清单中

 <application

   android:name="android.support.multidex.MultiDexApplication">

  </application>

我实现了这个i copy new.json我需要为所有10.0.1版本的google服务做什么?
 <application

   android:name="android.support.multidex.MultiDexApplication">

  </application>