Some input files use or override a deprecated API on WebviewManager.java
hi guys, when run project on android studio, i have this result:
Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\Users\NINU0\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\flutter_webview_plugin-0.3.0+2\android\src\main\java\com\flutter_webview_plugin\WebviewManager.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.
I also see the same in PowerShell logs after I Do Flutter run.
I think that's because of two different clients (webview changed between android versions). Code checks what android version it's using but I think we should add some link rule to the method.
Anyway it should be fine to use it as it is, feel free to make PR for it
@charafau am on android 9
@Dn-a Did you solve the problem?
@MeshkaniMohammad lately I have not used the plugin
Caught this error recently while building apk. Console output:
Initializing gradle... 2.5s
Resolving dependencies... 19.4s
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /Users/vanelizarov/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.3.1/android/src/main/java/com/flutter_webview_plugin/WebviewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 115.1s
Built build/app/outputs/apk/release/app-release.apk (8.8MB).
Flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel dev, v1.3.13, on Mac OS X 10.14.4 18E220a, locale en-RU)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.2)
[✓] Android Studio (version 3.3)
[✓] VS Code (version 1.32.1)
[✓] Connected device (1 available)
@vanelizarov I think it's a warning! because you built your apk successfully.
Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Running Gradle task 'assembleRelease'... Running Gradle task 'assembleRelease'... Done 108.5s Gradle task assembleRelease failed with exit code 1
Flutter fails to build an apk using flutter build apk
and logs this output:
Resolving dependencies... 1.8s
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 44.5s
Gradle task assembleRelease failed with exit code 1
While if I make a release build if I open the android folder, the apk is built successfully. I am using a webview in my application if that makes any difference.
I have the same problem with many other plugins. Did someone found a solution already?
Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.12.9+5\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.12.9+5\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\connectivity-0.4.5\android\src\main\java\io\flutter\plugins\connectivity\ConnectivityBroadcastReceiver.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. Note: C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\url_launcher-5.2.0\android\src\main\java\io\flutter\plugins\urllauncher\WebViewActivity.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.
Hi Guys, I'm also facing same issue:
Note: /Users/muhammadmateen/Library/flutter-sdk/.pub-cache/hosted/pub.dartlang.org/flutter_webview_plugin-0.3.8/android/src/main/java/com/flutter_webview_plugin/WebviewManager.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 106.2s
Gradle task assembleRelease failed with exit code 1
@charafau facing the same issue. 1 year and still no solutions?
Hello guys, i had the same problem with url_luncher after i moved with webview instead the same error appears
Any news?
any update guys?? I am also facing the same issue :(
Still no updates?
I had the problem but changed the minSDKVersion to 23 in the app build.gradle and it worked
I still have the same problem
It's just a warning to support older android versions, guess I can add annotation for linter not to mention it.
hey guys, I'm no professional programmer, I did face the problem during compiling the code. and I found a solution
just change the lunching activity in the manifest file and rebuild the project and then again change the lunching activity to the default one. it worked for me hope it will work for you guys and if you want to identify the problem try this code in build.gradle(project)
allprojects { repositories { google() jcenter()
}
gradle.projectsEvaluated { tasks.withType(JavaCompile){ options.compilerArgs << "-Xlint:deprecation" } } }
I'm having the same issue with "url_launcher" package.
same issue with ''clipboard_manager" package.
I'm having the same issue with "url_launcher" package.
try url_launcher: ^4.2.0
I solved the issue by add android:usesCleartextTraffic="true" to file path android/app/src/main/AndroidManifest.xml it should look like this:
<application
android:name="io.flutter.app.FlutterApplication"
android:label="app_name"
android:icon="@mipmap/ic_launcher"
android:usesCleartextTraffic="true">
I solved the issue by add
android:usesCleartextTraffic="true"to file path android/app/src/main/AndroidManifest.xml it should look like this:<application android:name="io.flutter.app.FlutterApplication" android:label="app_name" android:icon="@mipmap/ic_launcher" android:usesCleartextTraffic="true">
great, it works for me.
use minSDKVersion 23 , in the app build.gradle it's work fine!
For me what worked in my instance was generating and inserting a new Maps API Key
Now waiting ion the "Running gradle task 'assembledebug'"
Fingers crossed that it won't return error!
Flutter fails to build an apk using
flutter build apkand logs this output:Resolving dependencies... 1.8s Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Running Gradle task 'assembleRelease'... Running Gradle task 'assembleRelease'... Done 44.5s Gradle task assembleRelease failed with exit code 1
While if I make a release build if I open the android folder, the apk is built successfully. I am using a webview in my application if that makes any difference.
you find the solution ?
try this: add below code in Android/app/build.gradle file
configurations { compile.exclude group: 'com.google.zxing' }
Those warning messages are coming from the packages that you use inside your flutter project. As long as those dependencies be as same, you can't get rid of them.
https://www.nuomiphp.com/eplan/en/89136.html
Hello guys, i had the same problem with url_luncher after i moved with webview instead the same error appears
Any news?
same problem here