expo: Plugin with id 'maven' not found for `:unimodules-core` and compileSdkVersion is not specified

Summary

We are using bare minimum expo on our react native project which was created by using react-native-cli . Inorder to use some expo module we had to install the expo client as detailed in the documentation here https://docs.expo.dev/bare/installing-expo-modules/ The installation was completed but when trying to build the app on android, its throwing error saying

* What went wrong:
A problem occurred evaluating project ':unimodules-core'.
> Plugin with id 'maven' not found.

2: Task failed with an exception.
-----------
* What went wrong:
A problem occurred configuring project ':expo'.
> compileSdkVersion is not specified. Please add it to build.gradle

Found a similar issue but it doesn’t have any answer https://github.com/expo/expo/issues/16173

What platform(s) does this occur on?

Android

Environment

Here is the information on the packages

    "expo": "^46.0.8",
    "expo-gl": "^11.4.0",
    "react": "18.0.0",
    "react-native": "0.69.3"

Minimal reproducible example

The application was created using react-native-cli . All we did is run

npx install-expo-modules@latest

As mentioned in the official documentation https://docs.expo.dev/bare/installing-expo-modules/

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (1 by maintainers)

Most upvoted comments

me too, expo version 46.0.0 anyone managed to have a workaround on this?

[stderr] FAILURE: Build completed with 2 failures.
[stderr] 1: Task failed with an exception.
[stderr] -----------
[stderr] * Where:
[stderr] Build file '/home/expo/workingdir/build/node_modules/@unimodules/core/android/build.gradle' line: 3
[stderr] * What went wrong:
[stderr] A problem occurred evaluating project ':unimodules-core'.
[stderr] > Plugin with id 'maven' not found.
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] ==============================================================================
[stderr] 2: Task failed with an exception.
[stderr] -----------
[stderr] * What went wrong:
[stderr] A problem occurred configuring project ':expo'.
[stderr] >
[stderr] compileSdkVersion is not specified. Please add it to build.gradle
[stderr] * Try:
[stderr] > Run with --stacktrace option to get the stack trace.
[stderr] > Run with --info or --debug option to get more log output.
[stderr] > Run with --scan to get full insights.
[stderr] ==============================================================================
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 2m 3s