Closed HarshMB closed 2 years ago
you need to set compileSdkVersion = 31
Changing to compileSdkVersion=31 will throw the error:
Apps targeting Android 12 and higher are required to specify an explicit value for `android:exported` when the corresponding component has an intent filter defined. See https://developer.android.com/guide/topics/manifest/activity-element#exported for details
The androidmanifest of this library should add the exported property on the activity so we can compile for sdk 31.
Hello folks, any pull request is welcome! <3
I had the same issue with one of my project. For my part, it was just because i didn't read the installation part of the README.md file. I forgot to configure the android/build.gradle file, according to the documentation of this repository. If we have the same issue, just read the README.md carrefully, and don't forget to do this step:
Modify your android/build.gradle configuration:
buildscript { ext { buildToolsVersion = "30.0.2" minSdkVersion = 21 compileSdkVersion = 30 targetSdkVersion = 30 ndkVersion = "21.4.7075529" // Remove 'supportLibVersion' property and put specific versions for AndroidX libraries androidXAnnotation = "1.2.0" androidXBrowser = "1.3.0" // Put here other AndroidX dependencies }
@Ronaldvdh-ISAAC @jdnichollsc submitted a PR to make it compatible with sdk version 31.
@jdnichollsc could you also make a new release on npm with this fix. We're upgrading to the RN 0.68 which now target sdk 31.
How can I set the minCompileSdk (31) with Expo ? I'm using expo 44
Thank you
This is my build.gradle
and the error still appears on my machine :
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
// // Remove 'supportLibVersion' property and put specific versions for AndroidX libraries
// androidXAnnotation = "1.2.0"
// androidXBrowser = "1.3.0"
// // Put here other AndroidX dependencies
ext {
// supportLibVersion = "28.0.0"
androidXAnnotation = "1.2.0"
androidXBrowser = "1.3.0"
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "21.4.7075529"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.2")
classpath('com.google.gms:google-services:4.3.3') // FCM
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
// google()
maven { url 'https://www.jitpack.io' }
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
I am also facing the same issue
@1mehdifaraji @fullsnack-DEV check this out guys, might be related https://github.com/facebook/react-native/issues/35210
Try upgrading your current RN version to the latest version of same version you are using, there seems to be issue with RN since last Friday. For more details, pls check - https://github.com/facebook/react-native/issues/35210
regardez plutôt cette vidéo (simple et efficace) et le problème est résolu, voici le lien
@fullsnack-DEV I am Also facing same issue any solution ?
I solved the issue by adding this piece of code at the end of dependencies inside android/app/build.gradle :
android/app/build.gradle
dependencies {
....
....
api(group: "androidx.work", name: "work-runtime") {
version {
strictly "2.7.0-alpha04"
}
}
}
And this is android/build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 30
targetSdkVersion = 30
ndkVersion = "21.4.7075529"
androidXCore = "1.7.0" // <-- Add this. Check versions here: https://developer.android.com/jetpack/androidx/releases/core
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.2")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
mavenCentral()
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
url("$rootDir/../node_modules/react-native/android")
}
maven {
// Android JSC is installed from npm
url("$rootDir/../node_modules/jsc-android/dist")
}
google()
maven { url 'https://www.jitpack.io' }
}
}
@1mehdifaraji Thanks for response, i resolve this issue by change version from 30 to 31 and upgrade some npms !
After adding into latest version of react native project (v0.66.4), i am getting below errors :-
My react-native-inappbrowser-reborn version is 3.6.3
My other configurations :-