React Native Task:app:processDebugResources无法执行aapt

时间:2019-06-20 10:31:12

标签: java android react-native

我在调试中构建项目没有问题。我刚刚安装了一个新的npm软件包(bugsnag),然后做了react-native链接,现在我无法再构建它了。我尝试了谷歌的许多建议解决方案,但都没有用。

奇怪的部分,我试图构建项目的备份文件,并且它的构建也没有出现相同的错误,所以感觉它与其他东西有关吗?

错误详情:

NavigationComponent

....

  

产生于:java.util.concurrent.ExecutionException:   com.android.ide.common.process.ProcessException:执行时出错   处理   C:\ Users \ eless \ AppData \ Local \ Android \ Sdk \ build-tools \ 27.0.3 \ aapt.exe   带有参数{package -f --no-crunch -I   C:\ Users \ eless \ AppData \ Local \ Android \ Sdk \ platforms \ android-27 \ android.jar   -M \?\ D:\ React \ swipe-app-developp \ android \ app \ build \ intermediates \ manifests \ full \ debug \ AndroidManifest.xml   -S D:\ React \ swipe-app-developp \ android \ app \ build \ intermediates \ res \ merged \ debug   -m -J \?\ D:\ React \ swipe-app-developp \ android \ app \ build \ Generated \ source \ r \ debug   -F D:\ React \ swipe-app-developp \ android \ app \ build \ intermediates \ res \ debug \ resources-debug.ap_   -D \?\ D:\ React \ swipe-app-developp \ android \ app \ build \ intermediates \ multi-dex \ debug \ manifest_keep.txt   --custom-package xx.com.xx -0 apk --output-text-symbols \?\ D:\ React \ swipe-app-developp \ android \ app \ build \ intermediates \ symbols \ debug   --no-version-vectors}

> Task :app:processDebugResources
Failed to execute aapt
com.android.ide.common.process.ProcessException: Failed to execute aapt
  

app \ build.gradle

Error while executing process C:\Users\eless\AppData\Local\Android\Sdk\build-tools\27.0.3\aapt.exe with arguments

1 个答案:

答案 0 :(得分:0)

好吧,我尝试了不同的方法,并找到了我认为合适的解决方案。

在android / gradle / gradle-wrapper.properties中

我改变了

from
  

distributionUrl = https://services.gradle.org/distributions/gradle-4.1-all.zip

to
  

distributionUrl = https://services.gradle.org/distributions/gradle-4.6-all.zip

希望对您有帮助。