Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Studio-- Cause: error=86, Bad CPU type in executable

Android Studio throws an error while building the project.

the error is :

Cause: error=86, Bad CPU type in executable.

enter image description here

The detail error: enter image description here

Bad CPU type in executable --> Can not run command xxx/aapt

like image 601
Michael Yang Avatar asked Jun 12 '19 02:06

Michael Yang


2 Answers

Finally I solved this by a little change.

goto the error module and changed the buildToolsVersion to anther(bigger version) in build.gradle file.

rebuild again, the error disappeared.

like image 125
Michael Yang Avatar answered Oct 23 '22 08:10

Michael Yang


ADB doesn't support ARM, it needs Rosetta to run. I fixed this issue by installing Rosetta. Open Terminal and run the following command:

softwareupdate --install-rosetta
like image 37
iamanbansal Avatar answered Oct 23 '22 08:10

iamanbansal