0
我想在我的项目的android studio中生成已签名的apk但是它给了我错误。我是android新手,请帮助我。试图在android工作室生成已签名的apk给出错
摇篮控制台,堆栈跟踪是这样的:
Executing tasks: [:app:assembleRelease]
Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72200Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42200Library 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:compileReleaseJava UP-TO-DATE
:app:lintVitalRelease
:app:compileReleaseNdk UP-TO-DATE
:app:preDexRelease UP-TO-DATE
:app:dexRelease UP-TO-DATE
:app:processReleaseJavaRes UP-TO-DATE
:app:validateExternalOverrideSigning
:app:packageRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
A problem was found with the configuration of task ':app:packageRelease'.
> File '2222' specified for property 'signingConfig.storeFile' does not exist.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 3.685 secs
而且控制台消息摇篮:
Information:Gradle tasks [:app:assembleRelease]
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72200Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42200Library 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:compileReleaseJava UP-TO-DATE
:app:lintVitalRelease
:app:compileReleaseNdk UP-TO-DATE
:app:preDexRelease UP-TO-DATE
:app:dexRelease UP-TO-DATE
:app:processReleaseJavaRes UP-TO-DATE
:app:validateExternalOverrideSigning
:app:packageRelease FAILED
Error:A problem was found with the configuration of task ':app:packageRelease'.
> File '2222' specified for property 'signingConfig.storeFile' does not exist.
Information:BUILD FAILED
Information:Total time: 3.685 secs
Information:1 error
Information:0 warnings
Information:See complete output in console
我的摇篮文件是这样的:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "com.example.mubashirgul.androidtest"
minSdkVersion 15
targetSdkVersion 21
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
debug {
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.0.0'
}
请问您可以添加gradle文件吗?只要确保你删除了任何密码:) – Flaxie 2015-04-02 08:04:30
请再次检查问题。 – killer 2015-04-02 08:07:33
可能是因为构建工具版本是:'buildToolsVersion“21.1.2”',但您使用的appcompat库是'com.android.support:appcompat-v7:22.0.0'。考虑使用相同的版本。 – frek13 2015-04-02 08:10:46