所以我瀏覽了許多 stackoverflow 的答案,并嘗試將它們應用到我的代碼中,但我仍然找不到解決此錯誤的方法。此外,僅當我嘗試僅運行應用程序時才會發生此錯誤。我可以毫無問題地構建項目。所以這是我得到的錯誤。error: cannot access zzbgl class file for com.google.android.gms.internal.zzbgl not found在那之后,我將此作為警告D:\FinalProject\app\src\main\java\com\example\www\mytaxiapp\Welcome.java:uses or overrides a deprecated API.Recompile with -Xlint:deprecation for details.到目前為止,我嘗試更改版本和評論,還添加和刪除依賴項,但我仍然無法找到解決方案。希望有人能在這里幫助我。這是我的gradle APP級別文件apply plugin: 'com.android.application'android {compileSdkVersion 28defaultConfig { applicationId "com.example.www.mytaxiapp" minSdkVersion 16 targetSdkVersion 28 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 'com.android.support:multidex:1.0.3'implementation 'com.github.glomadrian:MaterialAnimatedSwitch:1.1@aar'implementation 'com.firebase:geofire-android:2.1.2'implementation 'com.github.d-max:spots-dialog:0.7@aar'implementation fileTree(dir: 'libs', include: ['*.jar'])implementation 'com.android.support:appcompat-v7:28.0.0-rc02'implementation 'com.android.support.constraint:constraint-layout:1.1.3'implementation 'com.google.android.gms:play-services-maps:12.0.1'implementation 'com.google.android.gms:play-services:12.0.1'implementation 'com.google.android.gms:play-services-location:12.0.1'testImplementation 'junit:junit:4.12'androidTestImplementation 'com.android.support.test:runner:1.0.2'androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'implementation 'com.google.firebase:firebase-core:16.0.1'implementation 'com.android.support:design:27.1.0'
2 回答

肥皂起泡泡
TA貢獻1829條經驗 獲得超6個贊
更新位置服務對我有用;)
implementation 'com.google.android.gms:play-services-location:15.0.1'
添加回答
舉報
0/150
提交
取消