Can't find the class com.google.android.gms.location.LocationClient (android)

后端 未结 11 1718
离开以前
离开以前 2020-12-15 16:03

I have download a demo project from http://developer.android.com/training/location/retrieve-current.html, and I think I don\'t lost any steps; But I can\'t find which jar fi

11条回答
  •  無奈伤痛
    2020-12-15 16:50

    Jeremie Petitjean's solution worked for me. Go into youbuild.grade file and configure your app for a lower version. This is what I used and it works now:

    apply plugin: 'com.android.application'   
    android {
        compileSdkVersion 19
        buildToolsVersion "19.1.0"
    
    defaultConfig {
        applicationId ""
        minSdkVersion 9
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
            }
        }
    }
    
    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.support:support-v4:19.1.0'
        compile 'com.android.support:appcompat-v7:19.0.1'
        compile 'com.google.android.gms:play-services:4.2+'
    }
    

提交回复
热议问题