当前位置:  开发笔记 > Android > 正文

Android错误构建签名APK

如何解决《Android错误构建签名APK》经验,为你挑选了3个好方法。

我尝试构建签名APK时收到此错误.我最近升级到API 23,但之后生成了APK:s.我糊涂了.寻求帮助并建议如何解决这个问题.这是错误

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:validateExternalOverrideSigning'.
> Keystore file /Users/me/Desktop/final apps/keystore.jks not 
found for signing config 'externalOverride'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --  
debug option to get more log output.

和日志

Information:Gradle tasks [:app:assembleRelease]
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72311Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesAppindexing810Library UP-TO-DATE
:app:prepareComGoogleAndroidGmsPlayServicesBasement810Library UP-TO-DATE
:app:prepareReleaseDependencies
:app:compileReleaseAidl UP-TO-DATE
:app:compileReleaseRenderscript UP-TO-DATE
:app:generateReleaseBuildConfig UP-TO-DATE
:app:generateReleaseAssets UP-TO-DATE
:app:mergeReleaseAssets UP-TO-DATE
:app:generateReleaseResValues UP-TO-DATE
:app:generateReleaseResources UP-TO-DATE
:app:mergeReleaseResources UP-TO-DATE
:app:processReleaseManifest UP-TO-DATE
:app:processReleaseResources UP-TO-DATE
:app:generateReleaseSources UP-TO-DATE
:app:compileReleaseJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources
:app:lintVitalRelease
:app:transformClassesWithDexForRelease
:app:mergeReleaseJniLibFolders
:app:transformNative_libsWithMergeJniLibsForRelease
:app:processReleaseJavaRes UP-TO-DATE
:app:transformResourcesWithMergeJavaResForRelease
:app:validateExternalOverrideSigning FAILED
Error:Execution failed for task ':app:validateExternalOverrideSigning'.
> Keystore file /Users/me/Desktop/final apps/keystore.jks not found for
signing config 'externalOverride'. 

这是我的Gradle

apply plugin: 'com.android.application'

android {
compileSdkVersion 23
buildToolsVersion "23.0.2"


defaultConfig {
    applicationId "com.waffles.vatsandbats"
    minSdkVersion 14
    targetSdkVersion 23
}

buildTypes {
    release {
        minifyEnabled false
         proguardFiles getDefaultProguardFile('proguard-android.txt'),
'proguard-rules.txt'     
    }
}
}

dependencies {

compile files('libs/acra-4.7.0-javadoc.jar')
compile files('libs/acra-4.7.0-sources.jar')
compile files('libs/acra-4.7.0.jar')
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
compile files('libs/activation.jar')
compile files('libs/mail.jar')
compile files('libs/additionnal.jar')
compile 'com.android.support:support-v4:23.1.1'
compile 'com.android.support:appcompat-v7:23.1.1'


}

Waffles.Inc.. 108

我找到了解决方案.我错放了keystore.jks文件的路径.搜索我的计算机上使用该路径的文件,一切正常!



1> Waffles.Inc..:

我找到了解决方案.我错放了keystore.jks文件的路径.搜索我的计算机上使用该路径的文件,一切正常!


我将.jks文件移动到另一个位置并忘记在android studio中更新x后出现此错误x)谢谢

2> Martin Pfeff..:

文件 - >使缓存无效并重新启动...

构建 - >构建签名APK - > 检查对话框中的路径

检查密钥库路径



3> Jacobo Koeni..:

这是在生成.jks文件时,通过写下"文件名"而不是路径而产生的问题.生成一个新的,将其放在桌面(或任何其他真实路径)上并重新生成APK.


Android Studio允许您选择一个文件夹,这是我的问题...我选择了文件夹,而不是密钥文件... -1使得Android Studio无法选择某些内容。
推荐阅读
wangtao
这个屌丝很懒,什么也没留下!
DevBox开发工具箱 | 专业的在线开发工具网站    京公网安备 11010802040832号  |  京ICP备19059560号-6
Copyright © 1998 - 2020 DevBox.CN. All Rights Reserved devBox.cn 开发工具箱 版权所有