[ANDROID] react-native-webview:compileDebugJavaWithJavac BUILD ERROR on 10.2.1
See original GitHub issueBug description: Hello, just upgraded to 10.2.1 from 9.4.
I am getting following two errors when building android.
.../node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewManager.java:1239: error: method setWebChromeClient(WebChromeClient) is already defined in class RNCWebView
public void setWebChromeClient(WebChromeClient client) {
^
.../node_modules/react-native-webview/android/src/main/java/com/reactnativecommunity/webview/RNCWebViewModule.java:276: error: cannot find symbol
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
^
symbol: variable Q
location: class VERSION_CODES
I have done ./gradlew clean and reset npm cache, but same result.
Environment:
- OS: MacOS
- OS version: 10.15.5
- react-native version: 0.61.5
- react-native-webview version: 10.2.1
Issue Analytics
- State:
- Created 3 years ago
- Reactions:17
- Comments:21 (2 by maintainers)
Top Results From Across the Web
React Native Android build failure with different errors without ...
The build failures for Android was due to the publish of the React Native version 0.71.0-rc0 . Note: Error may be different but...
Read more >[FIXED] Android build failures `No matching variant of ... - GitHub
I'd like to share an update on a series of build failures React Native & Expo users have been experiencing when building Android...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My solution is change compile SDK target 29 in path
android/build.gradle
@Jncls you must change your project to at least compile SDK target 29, usually it’s in the
ext
block ofandroid/build.gradle
it brings in the new symbols but crucially will not alter how the platform or Google view your app for review or execution purposes so it is not a major change (as opposed to changing your target SDK - that needs careful consideration)
This was a breaking change for library consumers and was regrettably not marked as such, sorry for the trouble