Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

new react native project won't compile for android #92

Closed
vu-dang opened this issue Jan 20, 2022 · 1 comment
Closed

new react native project won't compile for android #92

vu-dang opened this issue Jan 20, 2022 · 1 comment

Comments

@vu-dang
Copy link

vu-dang commented Jan 20, 2022

I getting this error:

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.work:work-runtime:2.7.0.

After creating a new project and add this package

npx react-native init myproject
yarn add @react-native-admob/admob
npx react-native run-android

It looks like this package requires SDK 31 but the current version of react-native is using SDK 30.

@wjaykim
Copy link
Collaborator

wjaykim commented Jan 21, 2022

It looks like this package requires SDK 31 but the current version of react-native is using SDK 30.

Yes, so you need to set the sdk version to 31. Then it will compile without error.

@vu-dang vu-dang closed this as completed Jan 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants