为属性指定Android的signingConfig.storeFile'不存在 [英] Android specified for property 'signingConfig.storeFile' does not exist

查看:2324
本文介绍了为属性指定Android的signingConfig.storeFile'不存在的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试着去生成APK签订使用AndroidStudio但我得到这个错误:

 错误:问题发现任务的配置:应用程序:packageRelease。
>文件'com.pachu.fartsound指定属性signingConfig.storeFile'不存在。

我不知道,如果你需要它,但有我的build.gradle:

 应用插件:'com.android.application
应用插件:'机器人'
安卓{
    compileSdkVersion 19
    buildToolsVersion20.0.0    defaultConfig {
        的applicationIDcom.pachu.fartsounds
        9的minSdkVersion
        targetSdkVersion 19
        版本code 1
        的versionName1.2
    }
    buildTypes {
        发布 {
            runProguard假
            proguardFiles getDefaultProguardFile('proguard的-android.txt'),'proguard-rules.pro
        }
    }
}依赖{
    编译文件树(导演:'库',包括:['的* .jar'])
    编译com.android.support:appcompat-v7:19.+
    编译com.google.android.gms:播放服务:5.0.89
}


解决方案

转到建设 - >生成签名APK。创建密钥(或选择现有的) - >下一步 - >下一步 - >完成

如果你想这样做硬办法,你需要buildTypes之前指定已创建释放键进入signingConfigs。事情是这样的:

  signingConfigs {
        发布 {
            storeFile文件(/ yourkey.jks)//检查文件是否存在
            storePassword你的密码
            keyAlias​​YourAlias​​
            keyPassword你的密码
        }
    }

但是,这是没有用的有点。由于Android Studio提供了非常简单和容易的方法来创建签名APK文件准备好发布。并且还指定密钥的密码进入的build.gradle文件...... - 这是不可取的做它在安全性方面

Im trying to generate signed APK Using AndroidStudio but I get this error:

    Error:A problem was found with the configuration of task ':app:packageRelease'.
> File 'com.pachu.fartsound' specified for property 'signingConfig.storeFile' does not exist.

i dont know if you need it but there is my build.gradle:

    apply plugin: 'com.android.application'
apply plugin: 'android'
android {
    compileSdkVersion 19
    buildToolsVersion "20.0.0"

    defaultConfig {
        applicationId "com.pachu.fartsounds"
        minSdkVersion 9
        targetSdkVersion 19
        versionCode 1
        versionName "1.2"
    }
    buildTypes {
        release {
            runProguard false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
}

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.android.support:appcompat-v7:19.+'
    compile 'com.google.android.gms:play-services:5.0.89'
}

解决方案

Go to Build -> Generate Signed APK. Create your key (or choose existing) -> next -> next -> done!

If you want to do it "hard way" you need to specify already created release key into signingConfigs before buildTypes. Something like this:

signingConfigs {
        release {
            storeFile file("/yourkey.jks") //check that the file exists
            storePassword "YourPassword"
            keyAlias "YourAlias"
            keyPassword "YourPassword"
        }
    }

But this is useless somewhat. Because Android Studio provides very simple and easy way to create a signed APK file ready for publishing. And also specifying your key's password into the build.gradle file... - it isn't advisable to do it in terms of security.

这篇关于为属性指定Android的signingConfig.storeFile'不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆