我正在尝试在react native上为Android生成一个签名的APK,但我没有得到它,终端在下面返回此错误:
> Task :app:bundleReleaseJsAndAssets
warning: the transform cache was reset.
Welcome to React Native!
Learn once, write anywhere
info Writing bundle output to:, C:\Users\paulo\Documents\Sperio\speriomob\android\app\build\generated\assets\react\release\index.android.bundle
info Writing sourcemap output to:, C:\Users\paulo\Documents\Sperio\speriomob\android\app\build\generated\sourcemaps\react\release\index.android.bundle.map
info Done writing bundle output
info Done writing sourcemap output
info Copying 10 asset files
info Done copying assets
> Task :app:processReleaseGoogleServices
Parsing json file: C:\Users\paulo\Documents\Sperio\speriomob\android\app\google-services.json
> Task :app:lintVitalRelease
Calling mockable JAR artifact transform to create file: C:\Users\paulo\.gradle\caches\transforms-2\files-2.1\7b924f61dca3b36e28aeb94601753e06\android.jar with input C:\Android\Sdk\platforms\android-29\android.jar
> Task :app:validateSigningRelease FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:validateSigningRelease'.
> Keystore file not set for signing config release
* 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 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 5m 46s
249 actionable tasks: 249 executed
有谁遇到过这个错误,可以帮助我,我很绝望):
答案 0 :(得分:2)
如果您尚未签名应用。在此链接中生成上载密钥后: https://reactnative.dev/docs/signed-apk-android
否则,请检查是否将密钥库放置在/ android / app /文件夹中