2017-12-16 17 views
1

アンドロイドスタジオ3で署名付きapkを生成中に2つのエラーが発生しました。正常にビルドしようとすると をビルドしようとしました。 このエラーを解決する方法をお手伝いしてください。参照メソッドが見つかりませんライブラリクラスandroid.content.pm.PackageManagerのboolean isInstantApp()

しかし、署名付きapkを生成しようとすると、次のエラーが発生します。

警告:com.google.android.gms.internal.zzbga:com.google:ライブラリクラスandroid.content.pm.PackageManager

警告で参照する方法 'ブールisInstantAppを()' 見つけることができません。 android.gms.internal.zzbgb:参照されたメソッドが見つかりませんライブラリクラスandroid.content.pm.PackageManagerのboolean isInstantApp(java.lang.String) '

以下は私のbuild.gradleファイルのコードです。

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion '26.0.2' 

    defaultConfig { 
     applicationId "com.micropeda.sudoku" 
     minSdkVersion 15 
     targetSdkVersion 22 
     versionCode 20171216 
     versionName "2.4.1" 
    } 


    buildTypes { 
     release { 
      minifyEnabled true 
      shrinkResources true 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    implementation 'com.google.android.gms:play-services-ads:11.6.2' 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    //noinspection GradleCompatible 
    compile 'com.android.support:appcompat-v7:22.1.1' 
    compile 'com.google.android.instantapps:instantapps:1.1.0' 
} 
+0

なぜこの質問が下落したのですか? –

答えて

1

解決済みです。私はただbuild.gradleファイルを更新しました。 ここに私の更新されたbuild.gradleがある

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 26 
    buildToolsVersion '27.0.1' 

    defaultConfig { 
     applicationId "com.micropeda.sudoku" 
     minSdkVersion 15 
     targetSdkVersion 26 
     versionCode 20171216 
     versionName "2.4.1" 
    } 


buildTypes { 
     release { 
      minifyEnabled true 
      shrinkResources true 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 

} 

dependencies { 
    implementation 'com.google.android.gms:play-services-ads:11.6.2' 
    compile fileTree(dir: 'libs', include: ['*.jar']) 
    //noinspection GradleCompatible 
    compile 'com.android.support:appcompat-v7:22.1.1' 
    compile 'com.google.android.instantapps:instantapps:1.1.0' 
} 
関連する問題