invertase / react-native-apple-authentication

A React Native library providing support for Apple Authentication on iOS and Android.
Other
1.41k stars 223 forks source link

error compiling kotlin (build phase) Unresolved reference: webViewClient #220

Closed cerezagroup closed 3 years ago

cerezagroup commented 3 years ago

When I run yarn android:

I get in following error:

> Task :invertase_react-native-apple-authentication:compileDebugKotlin FAILED

Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
332 actionable tasks: 332 executed
e: C:\projects\CG\react_native_projects\cuploo\node_modules\@invertase\react-native-apple-authentication\android\src\main\java\com\RNAppleAuthentication\webview\SignInWebViewDialogFragment.kt: (63, 13): **Unresolved reference: webViewClient**

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':invertase_react-native-apple-authentication:compileDebugKotlin'.
> Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.      

* Get more help at https://help.gradle.org

BUILD FAILED in 34s

I don't know what is happening, I have tried gradlew clean, yarn - --reset-cache, reinstalling invertase/react-native-apple-authentication, and I keep getting the same error.

the versions of the librarias are the following: react-native@0.64.2 @invertase/react-native-apple-authentication@2.1.2

the gradle versions are com.android.tools.build:gradle:4.1.0. https\://services.gradle.org/distributions/gradle-6.7-all.zip (url to gradle download)

If someone has an idea of what could be happening I would appreciate it

mikehardy commented 3 years ago

The top two references here were interesting, both pointing to a possibly buggy dependency on anko library?

https://duckduckgo.com/?t=ffab&q=kotlin+unresolved+reference+webViewClient

This will need a https://stackoverflow.com/help/minimal-reproducible-example for any sort of progress if that doesn't help

cerezagroup commented 3 years ago

Thank you very much, unfortunately, the solutions proposed were very old, the issue was more on the side of the gradle version that conflicted with @ invertase / react-native-apple-authentication,

The version of gradle that was left for the conflict to disappear is: com.android.tools.build:gradle:4.1.0. //android/build.gradle https://services.gradle.org/distributions/gradle-6.7-all.zip (url to gradle download) //gradle-wraper.properties

mikehardy commented 3 years ago

Oh! That's something that could use a documentation update (little pencil icon top right of the README) if we have a minimum version of gradle plugin and or gradle distribution that we need. I wasn't aware we'd bumped requirements there

I will say if you are using gradle plugin 4.1.x and gradle 6.x you should use current stable on them at least - 4.1.2 and 6.8.3 at the moment

I know there are other incompatibilities to handle if you go past those, which will require either patch-package fixes on older react-native or newer react-native versions (react-native 0.64 unpatched works on gradle plugin 4.2.x but for gradle distribution 7.x you need a react-native CLI patch https://github.com/react-native-community/cli/pull/1396)