Android应用程序在调试中工作,但不在发布中,idk为什么
Twitter登录在debug中工作,但不是在发布中,而且在debug中apk的大小更大。 问题出在哪里 我有三项活动 这是建筑,格兰德Android应用程序在调试中工作,但不在发布中,idk为什么,android,firebase,twitter,Android,Firebase,Twitter,Twitter登录在debug中工作,但不是在发布中,而且在debug中apk的大小更大。 问题出在哪里 我有三项活动 这是建筑,格兰德 apply plugin: 'com.android.application' android { compileSdkVersion 29 buildToolsVersion "29.0.2" defaultConfig { applicationId "com.PolDevs.MyClickerGame"
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.2"
defaultConfig {
applicationId "com.PolDevs.MyClickerGame"
minSdkVersion 23
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.google.firebase:firebase-auth:19.1.0'
implementation 'com.google.firebase:firebase-database:19.1.0'
implementation 'com.firebaseui:firebase-ui-auth:4.1.0'
implementation 'com.google.firebase:firebase-core:17.2.2'
implementation 'com.twitter.sdk.android:twitter-core:3.1.0'
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
}
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
打开您正在使用的所有库的文档,并仔细检查它们是否有任何要放入
proguard
中的特定规则,因为这在版本构建期间已启用proguard
在进行发布构建时会混淆您的APK,这意味着删除注释和注释等代码,这也会减少APK的大小因此,对于某些库,您必须在
proguard
文件中指定一些规则,以避免混淆某些内容。修改调试和发布版本时要注意的常见错误。哪里是proguard搜索名为proguard rules.pro的文件(应用程序级),您可以在其中指定规则。以下是您想要参考的文档:也可以在这里查看twitter:您是否有用于调试和发布的api密钥?