Android org.gradle.internal.exceptions.locationawareeexception:任务';的执行失败:app:bundleReleaseJsAndAssets&x27;
我在使用react native创建apk时出错Android org.gradle.internal.exceptions.locationawareeexception:任务';的执行失败:app:bundleReleaseJsAndAssets&x27;,android,react-native,Android,React Native,我在使用react native创建apk时出错 Executing task ':app:bundleReleaseJsAndAssets' (up-to-date check took 3.171 secs) due to: Output file /Users/tudeju/Project/react/JJTest/android/app/build/intermediates/assets/release/index.android.bundle has changed. Start
Executing task ':app:bundleReleaseJsAndAssets' (up-to-date check took 3.171 secs) due to:
Output file /Users/tudeju/Project/react/JJTest/android/app/build/intermediates/assets/release/index.android.bundle has changed.
Starting process 'command 'react-native''. Working directory: /Users/tudeju/Project/react/JJTest Command: react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output /Users/tudeju/Project/react/JJTest/android/app/build/intermediates/assets/release/index.android.bundle --assets-dest /Users/tudeju/Project/react/JJTest/android/app/build/intermediates/res/merged/release
:app:bundleReleaseJsAndAssets FAILED
:app:bundleReleaseJsAndAssets (Thread[Daemon worker Thread 9,5,main]) completed. Took 3.185 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:bundleReleaseJsAndAssets'.
> A problem occurred starting process 'command 'react-native''
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
Total time: 18.278 secs
Stopped 0 compiler daemon(s).
Received result CommandFailure[value=org.gradle.launcher.exec.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':app:bundleReleaseJsAndAssets'.] from daemon DaemonInfo{pid=68357, address=[fcf0a51c-b0d3-42da-8780-034150dcfe48 port:52043, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], idle=true, context=DefaultDaemonContext[uid=e83b1e6a-98c6-4893-8131-eb83fae3bd16,javaHome=/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home,daemonRegistryDir=/Users/tudeju/.gradle/daemon,pid=68357,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=CN,-Duser.language=zh,-Duser.variant]}.
昨天还可以。我今天早上重新启动了计算机。我怎样才能修好它 堆栈屏幕截图:
可能环境有一些错误。当我重新启动我的Mac电脑时,一切正常
这很奇怪 将此代码添加到文件..您的项目/app/proguard-rules.pro
-ignorewarnings
您已签名的APK将成功生成。它也无法解决我的问题:(它工作正常,但会忽略所有警告,希望不会在应用程序中出现任何问题