我正在尝试使用Gradlew命令编译Android应用。我在命令提示符下键入以下内容以执行构建:
gradlew.bat -PkeyAlias='test' -PkeyPass=test1234 -PstoreFile='C:/test/test_key_store.jks' -PstorePass=test1234 clean assembleStage
为了以防万一,我还尝试了以下方法:
gradlew.bat -PkeyAlias='test' -PkeyPassword=test1234 -PstoreFile='C:\test\test_key_store.jks' -PstorePassword=test1234 clean assembleStage
,它似乎不起作用。我收到以下错误:
> Task :app:validateSigningStageRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:validateSigningStageRelease'.
> Keystore file not set for signing config config
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1m 34s
45 actionable tasks: 43 executed, 2 up-to-date
这在Android Studio中可以完美运行,但是我也希望在命令提示符下也可以使用它。
谢谢!