简体   繁体   中英

android studio doesnt build cannot run program

After creating a new project, I met the following error:

java.io.IOException: Cannot run program "C:\NVPACK\android-sdk-windows\build-tools\build-tools-22.0.1\aapt.exe": CreateProcess error=193, %1 is not a valid Win32 application
at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047)
at com.android.builder.png.AaptProcess$Builder.start(AaptProcess.java:154)
at com.android.builder.png.QueuedCruncher$1.creation(QueuedCruncher.java:105)
at com.android.builder.tasks.WorkQueue.run(WorkQueue.java:206)

I read that it can be beacuse of the space in the file path. But the path does not contain any spaces. How to fix it?

我建议您可以将'-'替换为'_'或不使用'-'

I once have same problem. solved it by change the "Android SDK Build Tool" version 18.0.2 to 18.0.1 . upgrade or downgrade "Android SDK Build Tool" version may solve it as me. File-> Settings

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM