在模拟器或设备上通过物理设备进行测试时,应用运行良好。
但是当我尝试在 android studio 中生成签名的 apk 时,生成的签名应用程序不会安装在真实设备上。它显示了“解析包时出错”的错误。
我试过了
缩小启用假/真
我尝试删除 .gradle 和 .idea
尝试了多个键*enter code here
没有任何效果。请帮忙。
我的摇篮
{
plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
}
android {
compileSdkVersion 30
buildToolsVersion "30.0.3"
defaultConfig {
applicationId "com.reg.nsb"
minSdkVersion 21
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.3.0'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'com.google.firebase:firebase-messaging:22.0.0'
implementation 'com.google.firebase:firebase-config:21.0.0'
implementation 'com.google.firebase:firebase-analytics:19.0.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.intuit.sdp:sdp-android:1.0.6'
implementation 'com.intuit.ssp:ssp-android:1.0.6'
implementation 'com.google.code.gson:gson:2.8.5'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.flaviofaria:kenburnsview:1.0.7'
implementation 'com.mindorks.android:prdownloader:0.6.0'
implementation 'com.android.volley:volley:1.1.0'
}
}
答案 0 :(得分:0)
如果是,请检查设备上是否已安装调试版本,然后删除设备中已安装的调试版本并重新安装已签名的 apk
希望能帮到你