java无法在我的安卓设备中打开APK文件?
我无法在任何其他安卓设备上安装我的应用程序,讽刺的是,该应用程序在AVD和我的设备上运行良好。我不知道为什么,但每次我安装,它说“安装失败”或“应用程序未安装”! 提前感谢您回答这个问题
下面是我的build.gradle
文件:-
安卓 {
compileSdk 30
defaultConfig {
applicationId "com.example.sangeetplayer"
minSdk 21
targetSdk 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "安卓x.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-安卓-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation '安卓x.appcompat:appcompat:1.3.1'
implementation 'com.google.安卓.material:material:1.4.0'
implementation '安卓x.constraintlayout:constraintlayout:2.1.0'
testImplementation 'junit:junit:4.+'
安卓TestImplementation '安卓x.test.ext:junit:1.1.3'
安卓TestImplementation '安卓x.test.espresso:espresso-core:3.4.0'
implementation 'com.karumi:dexter:6.2.3'
}
# 1 楼答案
您必须在其他设备上安装应用程序的调试版本。要在其他设备上安装应用程序,您必须构建应用程序的版本。您需要一个
key store
来签署您的apk按照以下步骤生成已签名的apk
您的发布版本apk将位于项目文件夹->;释放