问题
Trying to get fastlane up and running for my Android project. I have the fastfile and appfile in my project directory, but when my lane executes the gradle action it fails with the following error:
Couldn't find gradlew at path '/Users/MyUser/Documents/Project/Android/gradlew'
Meanwhile, if I pull up that directory in Finder - the gradlew file is in fact present.
No clue what my next step should be here.. anyone have any similar problems or suggestions?
回答1:
I had the same issue, as I tried to place fastlane
in my Project-Dir on same level as /ios and /android.
You can easily solve it by adding the project_dir
parameter to your gradle-requests:
gradle(task: "clean assembleRelease", project_dir: 'android/')
回答2:
I was able to resolve this by moving my Fastfile into a fastlane directory. Previously I had the fastlane files in the root of my project, moving them resolved the issue.
回答3:
Not sure if this would help. I had a problem that fastlane didn't go to the right directory where gradlew existed (and complained about not finding gradlew). To overcome that, i changed directory to the location where gradlew is present in my project and ran 'fastalne init' again. That resolved my issue
来源:https://stackoverflow.com/questions/41249497/fastlane-cannot-find-gradlew-file