デバッグバージョンとリリースバージョンの両方を同じデバイスにインストールしようとしているので、ドキュメントに記載されているように、gradleファイルのbuildTypesブロックにapplicationIdSuffixを追加しようとしています。パッケージを作成することについては言及されておらず、パッケージが見つからないというエラーが表示されています。助けてください。
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
def versionMajor = 1
def versionMinor = 0
def versionPatch = 4
def versionBuild = 0
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.edu.gcfapp"
minSdkVersion 21
targetSdkVersion 26
versionCode versionMajor * 10000 + versionMinor * 1000 + versionPatch * 100 + versionBuild
versionName "${versionMajor}.${versionMinor}.${versionPatch}"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
arguments = ["room.schemaLocation": "$projectDir/schemas".toString()]
}
}
}
buildTypes {
debug {
applicationIdSuffix ".debug"
}
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
flavorDimensions "default"
私が得ているエラーはこれです。
Error:FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDevDebugGoogleServices'.
> No matching client found for package name 'com.edu.gcfapp.debug'
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 9s
GradleからGoogleサービスを省略していますが、Googleサービスを使用しているようです。
あなたのグーグル設定ファイル(私が思うgoogle-services.jsonファイル)にはcom.edu.gcfapp.debugの設定情報が含まれていません
Googleコンソールに戻り、リリースパッケージ名とデバッグパッケージ名の両方のファイルを作成して、関連するビルドフォルダーに配置します。
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加