androidsdkdetoxaapt

Detox android test references incorrect Android SDK path. "There was no "aapt" executable file in directory"


I have a React Native app up and running, and have Detox installed and working for iOS, but having issues running the test for Android. When I run the test, I get the following error:

There was no "aapt" executable file in directory: /Users/me/Library/Android/sdk/Users/me/Library/Android/sdk/build-tools/30.0.3.

There seems to be some duplication in that referenced path, but Users/me/Library/Android/sdk/build-tools/30.0.3 definitely exists. I'm not sure where this path is being referenced, or any config changes I can make to Detox to reference the SDK path correctly.


Solution

  • This error seemed to have been caused by an incorrect installation of the 30.0.3 SDK Build Tools. I simply uninstalled it and everything appears to be working fine now.

    In Android Studio -> Tools -> SDK Manager -> SDK Tools -> check "Show Package Details" -> uncheck the version you want to remove -> Apply