org.gradle.internal.exceptions.LocationAwareException:任务':app:bundleReleaseJsAndAssets'执行失败

时间:2016-01-25 06:24:18

标签: 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.
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]}.

昨天还可以。我今天早上重新启动了电脑 我该如何解决?

堆栈截图: screenshot

2 个答案:

答案 0 :(得分:2)

将此代码添加到文件..your-project / app / proguard-rules.pro

-ignorewarnings

您签名的APK将成功生成。

答案 1 :(得分:0)

可能环境有一些错误。我重新启动Mac时没关系。

很奇怪。