Builds locally but fails on EAS due to plugins in app.json
See original GitHub issueSummary
When adding plugins to app.json it builds fine locally but fails when running eas build.
We have this as a plugin in app.json: "plugins": ["./android-manifest.plugin.js"]
This is a simple file where we edit the android-manifest (which is not the problem). Then we prebuild locally to test and everything works fine. But when we run: expo build --platform android it fails with this error: ENOENT: no such file or directory, open '/home/expo/workingdir/build/apps/expo/android/gradlew'
We didn’t know why it failed but before we tried to upgrade to SDK 46 and for that we needed to specify the kotlin version in plugins. Whenever we remove the plugins out of app.json it works like a charm but with plugins it fails.
Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!
managed
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
45
Environment
expo-env-info 1.0.5 environment info: System: OS: macOS 12.4 Shell: 5.8.1 - /bin/zsh Binaries: Node: 16.16.0 - /usr/local/bin/node Yarn: 1.22.17 - /opt/homebrew/bin/yarn npm: 8.11.0 - /usr/local/bin/npm Watchman: 2022.07.04.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.4, iOS 15.5, macOS 12.3, tvOS 15.4, watchOS 8.5 Android SDK: API Levels: 30, 31, 32 Build Tools: 30.0.2, 30.0.3, 31.0.0, 32.0.0 System Images: android-32 | Google APIs ARM 64 v8a IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8092744 Xcode: 13.4.1/13F100 - /usr/bin/xcodebuild npmGlobalPackages: expo-cli: 5.5.1 Expo Workflow: bare
Reproducible demo
- Make an expo project
- Add plugins to your app.json:
"plugins": [
[
"expo-build-properties",
{
"android": {
"kotlinVersion": "1.6.10"
}
}
]
]
- Run
expo prebuild - Run
expo build --platform android
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:13 (5 by maintainers)
Top Related StackOverflow Question
could you provide a repository with minimal reproducible example? i just tested a sdk 45 managed app with expo-build-properties plugin and it works for me.
can you share a link to the build?
probably you are accidentally uploading your android directory and it’s not running prebuild there, and you have some gitignore rules set to ignore gradlew