Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

this plugin is deprecated and use plugin migration #960

Open
uday-tatamd opened this issue Feb 8, 2023 · 8 comments
Open

this plugin is deprecated and use plugin migration #960

uday-tatamd opened this issue Feb 8, 2023 · 8 comments

Comments

@uday-tatamd
Copy link

The plugin flutter_webview_plugin uses a deprecated version of the Android embedding.
To avoid unexpected runtime failures or future build failures, try to see if this plugin supports the Android V2 embedding. Otherwise, consider removing it since a future release of Flutter will remove these deprecated APIs.
If you are a plugin author, take a look at the docs for migrating the plugin to the V2 embedding: https://flutter.dev/go/android-plugin-migration.

@uday-tatamd
Copy link
Author

i am also facing the same issue , please help me to get out of this error

@Antwen97
Copy link

Antwen97 commented Mar 15, 2023

You can use one of forked branches that fixed this problem. One of them is mine:
https://github.com/Antwen97/flutter_webview_plugin_V2

Like me, also others made same fix. Until a future merge, you can use forks typing (obviusly, indent code in the pubspec.yaml):
flutter_webview_plugin:
git:
url: GITHUB_FORK_URL

Just change "GITHUB_FORK_URL" with the url you choose that implements the android V2 migration.
In alternative, you can create your own fork and make the migration by yourself

@Laraveloper20
Copy link

Laraveloper20 commented Mar 16, 2023

@Antwen97 I try used to fork but it problem persist
image

@Antwen97
Copy link

Antwen97 commented Mar 16, 2023

@Antwen97 I try used to fork but it problem persist
image

Which compiled and target SDK version you are using?
I solved the problem just replacing the plugin version with the GitHub URL, clean and get

@Laraveloper20
Copy link

Laraveloper20 commented Mar 16, 2023

build.gradle
minSdkVersion 20
targetSdkVersion 33
In pubspec.yaml I got this
flutter_webview_plugin:
git:
url: https://github.com/Antwen97/flutter_webview_plugin_V2
ref: master
I'm using
❯ flutter --version
Flutter 3.7.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision c07f788888 (3 weeks ago) • 2023-02-22 17:52:33 -0600
Engine • revision 0f359063c4
Tools • Dart 2.19.2 • DevTools 2.20.1

@hardy716
Copy link

hardy716 commented Apr 14, 2023

In the process of working on the Flutter app project, I applied this plugin, and I confirmed that this plugin is currently using an android v1 embedding method that has been discontinued.

I forked the repository and completed the migration with an Android v2 embedding scheme, and I found my project no longer has relevant warnings. Of course, it works fine!

If you guys are having the same problem as me, check my repository that completed the migration.

How to apply it is very simple!
You just need to write a few extra lines of code in pubspec.yaml.

dependencies:
    flutter_wbview_plugin:
        git:
            url: https://github.com/hardy716/flutter_webview_plugin.git

Please let me know if it doesn't apply or if an error occurs.

#962 (comment)

@Louna-akkad1
Copy link

In the process of working on the Flutter app project, I applied this plugin, and I confirmed that this plugin is currently using an android v1 embedding method that has been discontinued.

I forked the repository and completed the migration with an Android v2 embedding scheme, and I found my project no longer has relevant warnings. Of course, it works fine!

If you guys are having the same problem as me, check my repository that completed the migration.

How to apply it is very simple! You just need to write a few extra lines of code in pubspec.yaml.

dependencies:
    flutter_wbview_plugin:
        git:
            url: https://github.com/hardy716/flutter_webview_plugin.git

Please let me know if it doesn't apply or if an error occurs.

#962 (comment)
i have targetSdkVersion 33
and getting this error
error: cannot find symbol webView.getSettings().setAppCacheEnabled(appCacheEnabled);

@hardy716
Copy link

#962 (comment) i have targetSdkVersion 33 and getting this error error: cannot find symbol webView.getSettings().setAppCacheEnabled(appCacheEnabled);

Hi. I corrected the part that might be problematic in relation to what you said.
Check back and let me know if the problem persists!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants