2017-12-04 9 views
0

Google Play 서비스 플러그인에 문제가 있습니다. 그것은 현재 버전에서 이전 버전으로 업데이트하라는 의미입니다. 나는 여기에 다른 스레드를 쳐다 보았다. 그리고 그들은 이미 내가했던 앱 기반의 끝 부분에 플러그인을 넣으라고 말한다. 그러나 나는 여전히 오류를 얻고있다. 여기 현재 버전이 9.2.1인데도 Google Play 서비스가 업데이트됩니다.

내 매니페스트 코드 :

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="com.example.mikediloreto.findingrestaurants"> 
    <uses-permission android:name="android.permission.INTERNET"/> 
    <application 
     android:allowBackup="true" 
     android:icon="@mipmap/ic_launcher" 
     android:label="@string/app_name" 
     android:name=".MyApplication" 
     android:roundIcon="@mipmap/ic_launcher_round" 
     android:supportsRtl="true" 
     android:theme="@style/AppTheme"> 
     <activity android:name=".MainActivity"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
     <activity android:name=".ProfileActivity"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 
      </intent-filter> 
     </activity> 
    </application> 
</manifest> 

그리고 여기에 응용 프로그램 기반 Gradle을 수 있습니다 :

// 최상위 : 여기

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 26 
    buildToolsVersion "26.0.2" 
    defaultConfig { 
     applicationId "com.example.mikediloreto.findingrestaurants" 
     minSdkVersion 16 
     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.+' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    compile 'com.google.android.gms:play-services-auth:9.2.1' 
    compile 'de.hdodenhof:circleimageview:2.0.0' 
    compile 'com.squareup.picasso:picasso:2.5.2' 
    testCompile 'junit:junit:4.12' 
    compile 'com.google.android.gms:play-services-maps:11.0.4' 
} 

apply plugin: 'com.google.gms.google-services' 

프로젝트 기반의 빌드 Gradle을이다 모든 하위 프로젝트/모듈에 공통된 구성 옵션을 추가 할 수있는 빌드 파일.

buildscript { 
    repositories { 
     jcenter() 
    } 
    dependencies { 
     classpath 'com.android.tools.build:gradle:2.3.3' 
     classpath 'com.google.gms:google-services:3.1.2' 

     // NOTE: Do not place your application dependencies here; they belong 
     // in the individual module build.gradle files 
    } 
} 

allprojects { 
    repositories { 
     jcenter() 
    } 
} 

task clean(type: Delete) { 
    delete rootProject.buildDir 
} 

당신이 다른 코드를 포함하는 나 같은 것 있으면 알려 주시기 바랍니다. 모두 여기의

+0

빌드 그래 플 파일? – androidXP

+0

@androidXP 방금 추가했습니다. –

답변

1

먼저 u는 다음 U처럼 뭔가를 할 수 같은 버전을 가진 libs와 글로벌 변수를 가지고

compile 'com.google.android.gms:play-services-maps:11.0.4' 

compile 'com.google.android.gms:play-services-auth:9.2.1' 

그에게 좋은 연습을 할 야해 뭔가

compile "com.google.android.gms:play-services-auth:$google_ver" 

11.xxx nd 9.xxx ver 문제를 해결할 수 있습니다. 9.2.1 대신 11.0.4를 사용하십시오.

관련 문제