Closed jmdrew closed 3 years ago
Thanks for the report @jmdrew, I'll welcome a PR if this library needs any changes.
Getting the same error on "react-native-snackbar": "^2.2.3"
ext {
buildToolsVersion = "29.0.2"
minSdkVersion = 21
compileSdkVersion = 29
targetSdkVersion = 29
}
dependencies {
classpath("com.android.tools.build:gradle:3.5.3")
}
Getting the same error on
"react-native-snackbar": "^2.2.3"
ext { buildToolsVersion = "29.0.2" minSdkVersion = 21 compileSdkVersion = 29 targetSdkVersion = 29 } dependencies { classpath("com.android.tools.build:gradle:3.5.3") }
In your gradle.properties do you have: android.useAndroidX=true android.enableJetifier=true
Also if you are building using CI, you need to run npx jetify
before the gradlew build command.
Our issue was we never ran jetify to convert the libraries to Android X before building, but I will put a PR in to fix the issue anyway.
In your gradle.properties do you have: android.useAndroidX=true android.enableJetifier=true
Also if you are building using CI, you need to run
npx jetify
before the gradlew build command.Our issue was we never ran jetify to convert the libraries to Android X before building, but I will put a PR in to fix the issue anyway.
android.useAndroidX=true
and android.enableJetifier=true
is there. I'm building using Android Studio, no CI at this stage
@cooperka Any fix on this issue? I am also running into this issue now when I upgraded to RN 0.63.4
I have followed this fix and it solved the issue. Not sure how permanent this is https://stackoverflow.com/questions/52873056/cant-resolve-android-support-design-after-migration-to-androidx/52873231
@rimselis Cool, let me check it out.
Update: I feel like that one is a temporary solution. As it seems the library needs to have a fix landed to make it permanent fix.
Can anyone confirm that downgrading React Native resolves the issue? It doesn't appear to be a change to THIS library causing the issue, but rather trying to upgrade something else that uses Android X.
If anyone finds a backwards-compatible fix, please submit a PR ❤️
Running npx jetify
solved the issue for me, thanks @jmdrew !
Actually, that did solve the issue for me too. But its not a permanent solution is it?
@cooperka looks like this issue was introduced in PR #171. There is no need to use legacy support library to get reference to snackbar text view. I have submitted a PR (#177) which fixes this issue and also cleans code and improves runtime efficiency (a little bit ;)).
Unable to build android.useAndroidX=true android.enableJetifier=true
version: 2.3.0
Issue:
SnackbarModule.java - Line 129
TextView textView = (TextView) snackbarView.findViewById(android.support.design.R.id.snackbar_text);