question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android Build Errors for 0.67.1 and Unimodules. "Plugin with id 'maven' not found" and "compileSdkVersion is not specified"

See original GitHub issue

Summary

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

  1. 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
  2. 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”.
  3. 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:closed
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
JonnyLinjacommented, Feb 3, 2022

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!

0reactions
quachdevcommented, Feb 7, 2022

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.

    "expo": "43.0.5",
    "expo-barcode-scanner": "~11.1.2",
    "expo-blur": "~10.0.3",
    "expo-haptics": "~11.0.3",
    "expo-local-authentication": "~12.0.1",
    "expo-secure-store": "~11.0.3",
    "expo-sharing": "~10.0.3",
Read more comments on GitHub >

github_iconTop Results From Across the Web

what went wrong: a problem occurred configuring project ':app ...
React Naitve Android error compileSdkVersion is not specified. Please add it to build.gradle ... Even though it does exist in the app/build.gradle.
Read more >
compileSdkVersion is not specified error in React Native ...
In Android Studio, I can see that it says the same thing: Cause: compileSdkVersion is not specified. So I edited build.gradle(Module: app) file ......
Read more >
Plugin with id 'maven' not found. - Expo Development Tools
After I integrated expo unimodules in my bare expo project when i try to make the build for android then expo dependencies gives...
Read more >
unimodules-app-loader | Yarn - Package Manager
unimodules -app-loader. This module is to be used only by expo-task-manager , unimodules-react-native-adapter and Expo Client to run Expo applications in ...
Read more >
Plugin with id 'maven' not found. react native - CodeSolution
com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found