构建发布 apk 时发现意外的元数据类型
Unexpected metadata type found when build release apk
我正在尝试添加 facebook login.I 使用构建 apk(调试)但没有 error.But 当我尝试构建发布(签名)apk 时出现错误。
这是构建的ss。
我先添加了google登录方法,在调试和发布时没问题builds.Then我添加了facebook,但我现在只能得到调试版本。
我搜索了很多主题,但没有具体的解决方案given.What我应该怎么做?
Gradle(应用程序)
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.mertg.testsignin"
minSdkVersion 17
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.github.jd-alexander:android-flat-button:v1.1'
implementation 'com.anjlab.android.iab.v3:library:1.0.44'
implementation 'com.google.firebase:firebase-auth:15.0.0'
implementation 'com.google.firebase:firebase-database:15.0.0'
implementation 'com.google.android.gms:play-services-ads:15.0.0'
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.github.florent37:materialtextfield:1.0.7'
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:design:27.1.0'
}
apply plugin: 'com.google.gms.google-services'
尝试在 build.gradle (:app) 内的 android {} 标记中添加以下内容(在 buildTypes {} 下方)
lintOptions {
checkReleaseBuilds false
}
我正在尝试添加 facebook login.I 使用构建 apk(调试)但没有 error.But 当我尝试构建发布(签名)apk 时出现错误。
这是构建的ss。
我先添加了google登录方法,在调试和发布时没问题builds.Then我添加了facebook,但我现在只能得到调试版本。
我搜索了很多主题,但没有具体的解决方案given.What我应该怎么做?
Gradle(应用程序)
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.mertg.testsignin"
minSdkVersion 17
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.github.jd-alexander:android-flat-button:v1.1'
implementation 'com.anjlab.android.iab.v3:library:1.0.44'
implementation 'com.google.firebase:firebase-auth:15.0.0'
implementation 'com.google.firebase:firebase-database:15.0.0'
implementation 'com.google.android.gms:play-services-ads:15.0.0'
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.github.florent37:materialtextfield:1.0.7'
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:design:27.1.0'
}
apply plugin: 'com.google.gms.google-services'
尝试在 build.gradle (:app) 内的 android {} 标记中添加以下内容(在 buildTypes {} 下方)
lintOptions {
checkReleaseBuilds false
}