【发布时间】:2019-04-17 15:54:21
【问题描述】:
我刚刚从我在 Android Studio 中的代码中获得了一个签名版本的输出 apk。 输出如何无法在所有 android 设备上运行!
直到现在,正如我测试的那样: 它运行良好,可以安装在 Sony Z2 (android 6.0.1)、Samsung J5 (android 6.0.1)、j7 (android 6.0.1) 甚至 S10+ (android 9) 上
但是当我想在 Sony Z (android 5.1) 上安装它时,它说包已损坏! 或者将apk包发送到华为Y5设备(android 6.0,EMUI 4.1)后,手机将文件表现为ZIP,并显示apk文件的包含而不是安装它。
我想将我的输出类型从 Type 1 或 2 更改,但仍然有相同的结果
build.gradle(模块:app)
android {
compileSdkVersion 27
defaultConfig {
applicationId "ir.eqtech.transport"
minSdkVersion 16
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'
}
}
}
build.gradle(项目)
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
【问题讨论】:
标签: android apk release signed