未能在Android Studio

时间:2017-11-27 11:48:29

标签: android apk signing android-studio-3.0

我正在开发一个项目,当我尝试从build.Gradle发布已签名的APK时,它会给我这个错误:

  

错误:(20,0)C:\ Users \ sephn \ Downloads \ Fingerprint2Sleep-master \ signing.properties(系统找不到指定的文件)   打开文件

这是我的SigningConfigs:

signingConfigs {
        release {
            def File signingConfFile = file("../signing.properties")
            def Properties signingConf = new Properties()
            signingConf.load(new FileInputStream(signingConfFile))

            storeFile file(signingConf['C:\\Users\\sephn\\Downloads\\APKs & JKSs\\FingerPrintQuickie.jks'])
            storePassword signingConf['MyPassword']
            keyAlias signingConf['MyKey']
            keyPassword signingConf['MyPassword']
        }
    }

1 个答案:

答案 0 :(得分:0)

尝试删除signingConfig文件中signingConfigsbuild.gradle的所有用途。相反,请考虑使用Android Studio - >构建 - >生成已签名的APK,并手动输入您的凭据。

有时,基于gradle的签名脚本并不总是有效。另见:Android Studio 2.2 - Can no longer create unsigned release builds - "validateSigningReleaseLive FAILED"