离子不会在Windows上运行Android

时间:2016-11-05 07:13:58

标签: android ionic-framework

我是Ionic,Cordova,Angular的初学者......

当我运行离子for android(离子运行android)时,它无法继续运行并显示此错误:

Execution failed for task ':transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.8.0_91\bin\java.exe'' finished with non-zero exit value 2

我不知道它是什么?我怎么能解决这个问题?

提前致谢!

2 个答案:

答案 0 :(得分:0)

I am using another way to deploy my app to a physical device.
1. Open the project directory you are working in CMD.
2. Connect your device via usb
3. use command `"cordova run android" if you have added the platform android earlier else add  platform using `"cordova platform add android"`

答案 1 :(得分:0)

如果您还没有尝试将Android SDK和API更新为18。