Issue
I am trying to build an Android project via commandline with ./gradlew assemble
. On my Jenkins CI on Mac OS, I have the following build setup:
- compileSdkVersion = 25
- targetSdkVersion = 25
- minSdkVersion = 16
- buildToolsVersion = "25.0.0"
Unfortunately, when invoking AAPT, I get the following build error:
Cannot run program "android_home/build-tools/25.0.0/aapt" in /Users/Shared/Jenkins/Home/jobs/My_App/"): error=2, No such file or directory
This is a bit confusing to me, since all the directories are actually there. So what could be causing this error?
Solution
For anyone who is interested, the solution was to run aapt from the correct directory. The error above meant exactly what it meant: that aapt env path was incorrect (it was incorrectly android_home/build-tools/25.0.0/aapt
relative to current directory).
Once I set a PATH variable for aapt to the correct directory, everything worked.
Answered By - IgorGanapolsky
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.