gradle无法编译google地方API
编译最新版本工作正常,但由于我的模拟设备不是最新的谷歌播放版本,我不得不编译旧版本的API
编译'com.google.android.gms:play-services-places:10.0。+'
返回一个错误
错误:将字节码转换为dex时出错:
原因:com.android.dex.DexException:多个dex文件定义Lcom / google / android / gms / location / places / internal / zzw;
我已经尝试删除.gradle,我不使用任何其他的谷歌API
apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' android { compileSdkVersion 26 buildToolsVersion "25.0.2" defaultConfig { applicationId "com.example.myapp.myapplication" minSdkVersion 19 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) androidTestImplementation ('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" implementation 'com.android.support:appcompat-v7:26.0.0-beta2' compile 'com.beust:klaxon:0.30' compile("org.jetbrains.anko:anko:0.10.0") { exclude group: 'com.google.android', module: 'android' } testImplementation 'junit:junit:4.12' implementation 'com.android.support.constraint:constraint-layout:1.0.2' implementation 'com.android.support:design:26.0.0-beta2' compile 'com.google.android.gms:play-services-places:10.0.+' }
由于我可以编译最新版本,它可以在我自己的(真正的)Android设备上运行
更新gradle以编译'com.google.android.gms:play-services-maps:9.8.0'
- 片剂上的片段视图为空
- Gradle上的Android应用程序:无法合并dex
- 如何在Android Canvas上绘制实心三角形
- 滚动不适用于CoordinatorLayout +视差图像+ BottomSheetLayout
- 关闭/隐藏kotlin中的SoftinputKeyboard
- setRequestedOrientation,但仍然根据传感器而改变
- 如何在Retrofit 2中打印漂亮的照片?
- 无法在Kotlin中“findViewById”。 获取错误“types推断失败”
- Kotlin || RecycleView项目不会膨胀:RecycleView.Adapter的每个重写方法上的无法访问的代码