我已经在我的应用程序中集成了ZOOM SDK,在集成ZOOM SDK之后,我无法在移动设备上安装signed
apk。上面写着“未安装应用程序”。
ZOOM SDK提供了2个.aar文件,我已经将.aar文件作为模块依赖项导入了它们自己的build.gradle
文件。
我的构建文件
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
applicationId "----------"
minSdkVersion 21
targetSdkVersion 29
versionCode 3
versionName "2.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
def keystore_properties = file('../keystore.properties')
if (keystore_properties.exists()) {
Properties props = new Properties()
props.load(new FileInputStream(keystore_properties))
props.each { prop ->
project.ext.set(prop.key, prop.value)
}
}
// Read passwords from Gradle properties and if not found, then from environment variables
def keystore_password = project.hasProperty('KEYSTORE_PASSWORD') ? KEYSTORE_PASSWORD : System.getenv("KEYSTORE_PASSWORD")
def key_alias = project.hasProperty('KEY_ALIAS') ? KEY_ALIAS : System.getenv("KEY_ALIAS")
def key_password = project.hasProperty('KEY_PASSWORD') ? KEY_PASSWORD : System.getenv("KEY_PASSWORD")
signingConfigs {
release {
storeFile file('../android.jks')
storePassword keystore_password
keyAlias key_alias
keyPassword key_password
}
}
buildTypes {
release {
if (keystore_password && key_alias && key_password) {
signingConfig signingConfigs.release
} else {
logger.error("You need to define KEYSTORE_PASSWORD, KEY_ALIAS and KEY_PASSWORD to enable release signing.")
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
minifyEnabled false
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
zipAlignEnabled true
buildConfigField "String", "SERVER_URL", '"http://------------"'
buildConfigField "boolean", "debug", "false"
buildConfigField 'String', 'enc_key', enc_key
}
debug {
versionNameSuffix '.debug'
applicationIdSuffix '.debug'
minifyEnabled false
buildConfigField "String", "SERVER_URL", '"http://----------------"'
buildConfigField "boolean", "debug", "true"
buildConfigField 'String', 'enc_key', enc_key
}
uat {
if (keystore_password && key_alias && key_password) {
signingConfig signingConfigs.release
} else {
logger.error("You need to define KEYSTORE_PASSWORD, KEY_ALIAS and KEY_PASSWORD to enable release signing.")
}
minifyEnabled false
//useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
buildConfigField "String", "SERVER_URL", '"http://-----------"'
buildConfigField "boolean", "debug", "true"
buildConfigField 'String', 'enc_key', enc_key
}
}
}
dependencies {
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.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.android.material:material:1.0.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'androidx.browser:browser:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation project(path: ':commonlib')
implementation project(path: ':mobilertc')
//recyclerview-animators
implementation 'jp.wasabeef:recyclerview-animators:3.0.0'
}
commonlib构建文件
configurations.maybeCreate("default")
artifacts.add("default", file('commonlib.aar'))
mobilertc构建文件
configurations.maybeCreate("default")
artifacts.add("default", file('mobilertc.aar'))
我需要生成应该安装在设备上的签名apk,而无需使用zoom sdk,我可以生成签名apk并安装。