Android Build Errors for 0.67.1 and Unimodules. "Plugin with id 'maven' not found" and "compileSdkVersion is not specified"
See original GitHub issueSummary
I wanted to comment in https://github.com/expo/expo/issues/12774 to indicate that I still have issues despite the fixes, but the conversation has been locked. I wasn’t sure how else to bring this up without creating a new issue, so apologies if this is the incorrect channel to do so.
STEPS TAKEN POST 0.67.1 UPGRADE
- I upgraded all my expo unimodule libraries that I explicitly added (expo-font and expo-localization) to get past the maven and compileSdkVersion errors following this comment indicating that the issues should have been resolved. https://github.com/expo/expo/issues/12774#issuecomment-1027955561
 - I added additional expo unimodules whenever they failed to build for the exact same reasons. I previously did not need to add them. This includes expo-constants, expo-file-system, and expo-modules-core, although it seems to be ignoring expo-modules-core “because it contains invalid configuration”.
 - I am now getting the errors for :unimodules-app-loader instead, which I cannot add directly to my project. See below
 
1: Task failed with an exception.
-----------
* Where:
Build file '/Users/<redacted>/Documents/<redacted>/node_modules/unimodules-app-loader/android/build.gradle' line: 3
* What went wrong:
A problem occurred evaluating project ':unimodules-app-loader'.
> Plugin with id 'maven' not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':unimodules-app-loader'.
> com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 35s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Build file '/Users/<redacted>/Documents/<redacted>/node_modules/unimodules-app-loader/android/build.gradle' line: 3
* What went wrong:
A problem occurred evaluating project ':unimodules-app-loader'.
> Plugin with id 'maven' not found.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':unimodules-app-loader'.
> com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================
* Get more help at https://help.gradle.org
BUILD FAILED in 35s
Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!
bare
What platform(s) does this occur on?
Android
SDK Version (managed workflow only)
No response
Environment
Expo CLI 4.1.4 environment info: System: OS: macOS 11.3.1 Shell: 3.2.57 - /bin/bash Binaries: Node: 16.13.2 - ~/.nvm/versions/node/v16.13.2/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 8.1.2 - ~/.nvm/versions/node/v16.13.2/bin/npm Watchman: 2022.01.24.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.11.2 - /Users/glutecheeks/.rbenv/shims/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: API Levels: 21, 22, 23, 24, 25, 26, 27, 28, 29, 30 Build Tools: 23.0.1, 23.0.2, 23.0.3, 24.0.0, 24.0.1, 24.0.2, 24.0.3, 25.0.0, 25.0.1, 25.0.2, 25.0.3, 26.0.0, 26.0.1, 26.0.2, 27.0.0, 28.0.3, 29.0.2, 30.0.2 System Images: android-21 | Intel x86 Atom, android-21 | Intel x86 Atom_64, android-21 | Google APIs ARM EABI v7a, android-21 | Google APIs Intel x86 Atom, android-21 | Google APIs Intel x86 Atom_64, android-22 | Intel x86 Atom, android-22 | Intel x86 Atom_64, android-22 | Google APIs ARM EABI v7a, android-22 | Google APIs Intel x86 Atom, android-22 | Google APIs Intel x86 Atom_64, android-23 | Intel x86 Atom, android-23 | Intel x86 Atom_64, android-23 | Google APIs ARM EABI v7a, android-23 | Google APIs Intel x86 Atom, android-23 | Google APIs Intel x86 Atom_64, android-24 | Intel x86 Atom, android-24 | Intel x86 Atom_64, android-24 | Google APIs ARM 64 v8a, android-24 | Google APIs ARM EABI v7a, android-24 | Google APIs Intel x86 Atom, android-24 | Google APIs Intel x86 Atom_64, android-24 | Google Play Intel x86 Atom, android-25 | Google APIs ARM 64 v8a, android-25 | Google APIs ARM EABI v7a, android-25 | Google APIs Intel x86 Atom, android-25 | Google APIs Intel x86 Atom_64, android-25 | Google Play Intel x86 Atom, android-26 | Google APIs Intel x86 Atom, android-26 | Google Play Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-27 | Google Play Intel x86 Atom IDEs: Android Studio: 3.5 AI-191.8026.42.35.6010548 Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Expo Workflow: bare
Reproducible demo
Integrate it for the bare project after upgrading from 0.66 to 0.67.
Issue Analytics
- State:
 - Created 2 years ago
 - Comments:5 (2 by maintainers)
 

Top Related StackOverflow Question
Ah. I also just saw your comment in another github issue that how unimodules are handled has changed. Going to give it a try. Thanks!
Is there any resolution for SDK 43? We are running into this with version RN v0.67.2.
Tried to upgrade to SDK 44 and running into issues with imports from third party dependencies related to this issue here: https://github.com/expo/expo/issues/15622
Not sure which approach to take right now as we are blocked in either direction we go.
These are the relevant expo packages we are using: used expo install and it grabbed the latest compatible versions with SDK 43.