grpc失败的地理编码器无法解析android.os.servicemanager

时间:2017-09-05 21:35:13

标签: android google-maps google-geocoder

我正在使用android studio。我使用GeoCoder.getFromLocation从地址获取纬度和经度,但我得到java.io.IOException:grpc失败。

我尝试使用这个: java.io.IOException: grpc failed

并且:Geocoder Sources for Android API 26 Platform Not Found 我取消安装Android Studio并重新安装它,但没有任何东西

这是我的祖父档案

apply plugin: 'com.android.application' 

android {
    compileSdkVersion 26
    buildToolsVersion "26.0.1"
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/dependencies.txt'
        exclude 'META-INF/LGPL2.1'
    }
    defaultConfig {
        applicationId "com.project.francesco.ester"
        minSdkVersion 21
        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 {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26.0.1'
    compile 'com.android.support:support-v4:26.0.1'
    compile 'com.android.support:design:26.0.1'
    compile 'com.android.support.constraint:constraint-layout:1.0.2'
    compile 'com.firebase:firebase-client-android:2.5.0'
    compile 'com.google.firebase:firebase-auth:11.0.4'
    compile 'com.google.firebase:firebase-database:11.0.4'
    compile 'com.google.firebase:firebase-storage:11.0.4'
    compile 'com.firebaseui:firebase-ui:0.3.1'
    compile 'com.google.android.gms:play-services-maps:11.0.4'
    compile 'com.google.android.gms:play-services-location:11.0.4'
    compile 'com.firebase:geofire-java:2.1.1'
    compile 'com.firebaseui:firebase-ui-storage:2.3.0'
    testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

我不知道该怎么做

0 个答案:

没有答案