[英]Not Able To Open APK file in my android device?
I'm not able to install my app on any other android device and the irony is that, the app is working fine in AVD and on my device.我无法在任何其他 Android 设备上安装我的应用程序,具有讽刺意味的是,该应用程序在 AVD 和我的设备上运行良好。 I don't know why but everytime I install, it says "Installation Failed" or "App not Installed" !
我不知道为什么,但每次安装时,它都会显示“安装失败”或“应用程序未安装”! Thanks in advance for answering the question.
预先感谢您回答问题。
Below is my build.gradle
file:-下面是我的
build.gradle
文件:-
android {
compileSdk 30
defaultConfig {
applicationId "com.example.sangeetplayer"
minSdk 21
targetSdk 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.1'
implementation 'com.google.android.material:material:1.4.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.0'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.3'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.4.0'
implementation 'com.karumi:dexter:6.2.3'
}
You must be installing the debug build of your app on other devices.您必须在其他设备上安装应用程序的调试版本。 For installing your app on other devices, you've to build a release build of your app.
要在其他设备上安装您的应用程序,您必须构建您的应用程序的发布版本。 You would need a
key store
to sign your apk.您需要一个
key store
来签署您的 apk。
Follow the below steps to generate a signed apk按照以下步骤生成签名的 apk
Your release build apk would be in project folder -> release您的发布版本 apk 将位于项目文件夹 -> 发布中
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.