angular2 cordova android无法在模拟器中运行

时间:2016-09-26 20:17:01

标签: android cordova angular

我在cordova中设置了一个基本的angular2应用程序,它在iOS中运行正常,但是我在构建失败时遇到异常,我可以在基本的cordova应用程序中运行android。

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/local/opt/android-sdk/build-tools/24.0.2/aapt'' finished with non-zero exit value 1

Error: /Users/username/Code/workshop/cordova/angular-2/MyApp/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception. 

1 个答案:

答案 0 :(得分:0)

好吧我解决了由于node_modules文件夹太重而导致模拟器无法启动的问题,我从node_modules中删除了很多内容(即删除了依赖项和其他不需要的漏洞)并增加了可用资源avd。

事后顺利进行:)