gpt4 book ai didi

android - react native : Generating the Release Build APK error :app:mergeReleaseAssets FAILED

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:20:57 32 4
gpt4 key购买 nike

我正在尝试为 React native 应用程序创建签名的 apk。调试应用程序工作正常。我正在关注 react native guide用于创建签名的 APK。

我已经将 keystore 添加到应用程序并设置了 gradle 变量,但无法生成已签名的 apk。

下面是 assembleRelease 构建的错误

./gradlew assembleRelease --stacktrace

    NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /home/anuragdhunna/Android/Sdk/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to /home/anuragdhunna/Android/Sdk/ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareAndroidArchLifecycleRuntime100Library
:app:prepareComAndroidSupportAnimatedVectorDrawable2610Library
:app:prepareComAndroidSupportAppcompatV72610Library
:app:prepareComAndroidSupportSupportCompat2610Library
:app:prepareComAndroidSupportSupportCoreUi2610Library
:app:prepareComAndroidSupportSupportCoreUtils2610Library
:app:prepareComAndroidSupportSupportFragment2610Library
:app:prepareComAndroidSupportSupportMediaCompat2610Library
:app:prepareComAndroidSupportSupportV42610Library
:app:prepareComAndroidSupportSupportVectorDrawable2610Library
:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library
:app:prepareComFacebookFrescoDrawee190Library
:app:prepareComFacebookFrescoFbcore190Library
:app:prepareComFacebookFrescoFresco190Library
:app:prepareComFacebookFrescoImagepipeline190Library
:app:prepareComFacebookFrescoImagepipelineBase190Library
:app:prepareComFacebookFrescoImagepipelineOkhttp3190Library
:app:prepareComFacebookReactReactNative0560Library
:app:prepareComFacebookSoloaderSoloader030Library
:app:prepareOrgWebkitAndroidJscR174650Library
:react-native-splash-screen:preBuild UP-TO-DATE
:react-native-splash-screen:preReleaseBuild UP-TO-DATE
:react-native-splash-screen:checkReleaseManifest
:react-native-splash-screen:preDebugAndroidTestBuild UP-TO-DATE
:react-native-splash-screen:preDebugBuild UP-TO-DATE
:react-native-splash-screen:preDebugUnitTestBuild UP-TO-DATE
:react-native-splash-screen:preReleaseUnitTestBuild UP-TO-DATE
:react-native-splash-screen:prepareAndroidArchLifecycleRuntime100Library
:react-native-splash-screen:prepareComAndroidSupportAnimatedVectorDrawable2610Library
:react-native-splash-screen:prepareComAndroidSupportAppcompatV72610Library
:react-native-splash-screen:prepareComAndroidSupportSupportCompat2610Library
:react-native-splash-screen:prepareComAndroidSupportSupportCoreUi2610Library
:react-native-splash-screen:prepareComAndroidSupportSupportCoreUtils2610Library
:react-native-splash-screen:prepareComAndroidSupportSupportFragment2610Library
:react-native-splash-screen:prepareComAndroidSupportSupportMediaCompat2610Library
:react-native-splash-screen:prepareComAndroidSupportSupportV42610Library
:react-native-splash-screen:prepareComAndroidSupportSupportVectorDrawable2610Library
:react-native-splash-screen:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library
:react-native-splash-screen:prepareComFacebookFrescoDrawee190Library
:react-native-splash-screen:prepareComFacebookFrescoFbcore190Library
:react-native-splash-screen:prepareComFacebookFrescoFresco190Library
:react-native-splash-screen:prepareComFacebookFrescoImagepipeline190Library
:react-native-splash-screen:prepareComFacebookFrescoImagepipelineBase190Library
:react-native-splash-screen:prepareComFacebookFrescoImagepipelineOkhttp3190Library
:react-native-splash-screen:prepareComFacebookReactReactNative0560Library
:react-native-splash-screen:prepareComFacebookSoloaderSoloader030Library
:react-native-splash-screen:prepareOrgWebkitAndroidJscR174650Library
:react-native-splash-screen:prepareReleaseDependencies
:react-native-splash-screen:compileReleaseAidl UP-TO-DATE
:react-native-splash-screen:compileReleaseNdk NO-SOURCE
:react-native-splash-screen:compileLint UP-TO-DATE
:react-native-splash-screen:copyReleaseLint NO-SOURCE
:react-native-splash-screen:compileReleaseRenderscript UP-TO-DATE
:react-native-splash-screen:generateReleaseBuildConfig UP-TO-DATE
:react-native-splash-screen:generateReleaseResValues UP-TO-DATE
:react-native-splash-screen:generateReleaseResources UP-TO-DATE
:react-native-splash-screen:mergeReleaseResources UP-TO-DATE
:react-native-splash-screen:processReleaseManifest UP-TO-DATE
:react-native-splash-screen:processReleaseResources UP-TO-DATE
:react-native-splash-screen:generateReleaseSources UP-TO-DATE
:react-native-splash-screen:incrementalReleaseJavaCompilationSafeguard UP-TO-DATE
:react-native-splash-screen:javaPreCompileRelease
:react-native-splash-screen:compileReleaseJavaWithJavac UP-TO-DATE
:react-native-splash-screen:extractReleaseAnnotations UP-TO-DATE
:react-native-splash-screen:mergeReleaseShaders UP-TO-DATE
:react-native-splash-screen:compileReleaseShaders UP-TO-DATE
:react-native-splash-screen:generateReleaseAssets UP-TO-DATE
:react-native-splash-screen:mergeReleaseAssets UP-TO-DATE
:react-native-splash-screen:mergeReleaseProguardFiles UP-TO-DATE
:react-native-splash-screen:packageReleaseRenderscript NO-SOURCE
:react-native-splash-screen:packageReleaseResources UP-TO-DATE
:react-native-splash-screen:processReleaseJavaRes NO-SOURCE
:react-native-splash-screen:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
:react-native-splash-screen:transformClassesAndResourcesWithSyncLibJarsForRelease UP-TO-DATE
:react-native-splash-screen:mergeReleaseJniLibFolders UP-TO-DATE
:react-native-splash-screen:transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE
:react-native-splash-screen:transformNativeLibsWithSyncJniLibsForRelease UP-TO-DATE
:react-native-splash-screen:bundleRelease UP-TO-DATE
:app:prepareReleaseDependencies
:app:compileReleaseAidl UP-TO-DATE
:app:compileReleaseRenderscript UP-TO-DATE
:app:generateReleaseBuildConfig UP-TO-DATE
:app:mergeReleaseShaders UP-TO-DATE
:app:compileReleaseShaders UP-TO-DATE
:app:generateReleaseAssets UP-TO-DATE
:app:mergeReleaseAssets FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:mergeReleaseAssets'.
> java.io.IOException: Could not delete path '/home/anuragdhunna/projects/stu/tnpsuite/android/app/build/intermediates/assets/release/fonts/SimpleLineIcons.ttf'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

此外,我还有一个问题,为什么我会面临 NDK 警告?我没有使用 ndk,嗯,我有 SDK 平台工具。我怎样才能删除 NDK 警告,有什么猜测吗?

最佳答案

如果 ./gradlew clean 不能解决问题,您可以尝试以下操作:

  1. ReactNativeApp/android/build 目录重命名为 old.build
  2. 关闭 Android Studio
  3. 在 ReactNativeApp/android 中执行 ./gradlew clean
  4. 然后最后执行命令./gradlew assembleRelease

关于android - react native : Generating the Release Build APK error :app:mergeReleaseAssets FAILED,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52441143/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com