当试图在调试或发布版本中运行或构建我的apk时,我得到一个弹出窗口,说我的apk无法安装,因为它没有正确签名。我也同时显示此错误
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
到目前为止,我有:
卸载了与android studio,sdk,.idea,.iml和.gradle文件相关的所有内容
运行此keytool -genkey -v -keystore debug.keystore -alias android -keyalg RSA -keysize 2048 -validity 20000
我尝试过制作新的密钥库
我仍然无法让它运行调试或发布。这是我的应用程序gradle
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.gms.google-services'
repositories {
maven { url 'https://maven.fabric.io/public' }
mavenCentral()
}
android {
signingConfigs {
release {
keyAlias 'myalias'
keyPassword 'mypassword'
storePassword 'mypassword!'
storeFile file('E:/Android/keystore.jks')
}
}
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.intellidev.bitrichpro"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
dexOptions {
javaMaxHeapSize "4g"
preDexLibraries = false
}
afterEvaluate {
tasks.matching {
it.name.startsWith('dex')
}.each { dx ->
if (dx.additionalParameters == null) {
dx.additionalParameters = []
}
dx.additionalParameters += "--set-max-idx-number=60000" // default 60000
}
}
packagingOptions {
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
}
dependencies {
compile 'com.android.support:appcompat-v7:23.1.0'
compile 'me.grantland:autofittextview:0.2.+'
compile('org.bouncycastle:bcprov-jdk15on:1.48') {
exclude group: 'commons-io', module: 'commons-io'
}
compile('com.google.android.gms:play-services:8.1.0') {
exclude group: 'com.android.support', module: 'support-v4'
}
compile 'com.android.support:design:23.1.0'
compile('com.digits.sdk.android:digits:1.9.0@aar') {
transitive = true;
}
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.orhanobut:dialogplus:1.10@aar'
compile 'com.parse.bolts:bolts-android:1.+'
compile 'com.parse:parse-android:1.+'
compile 'com.android.support:cardview-v7:23.1.0'
compile 'me.zhanghai.android.materialprogressbar:library:1.0.2'
compile 'com.android.support:support-v4:23.1.0'
compile 'com.anjlab.android.iab.v3:library:1.0.+@aar'
compile('com.coinbase.android:coinbase-android-sdk:1.0.1')
compile 'com.google.android.gms:play-services-plus:8.1.0'
}
}
dependencies {
}
答案 0 :(得分:0)
您是否正在尝试构建发布版apk?您正在使用可能不存在的版本密钥库,因此您必须创建它。
在Android Studio中,您可以在构建 - >中创建发布密钥库。 生成签名Apk - > 创建新...
使用以下默认值自动创建调试密钥库:
密钥密码: android
密钥库名称: debug.keystore
密钥库密码: android
关键别名: androiddebugkey