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
Build failed on Android Target SDK 33 #1223
Comments
👋 @Dararii NOTE: This comment is auto-generated. Are you sure you have already searched for the same problem? Some people open new issues but they didn't search for something similar or for the same issue. Please, search for it using the GitHub issue search box or on the official inappwebview.dev website, or, also, using Google, StackOverflow, etc. before posting a new one. You may already find an answer to your problem! If this is really a new issue, then thank you for raising it. I will investigate it and get back to you as soon as possible. Please, make sure you have given me as much context as possible! Also, if you didn't already, post a code example that can replicate this issue. In the meantime, you can already search for some possible solutions online! Because this plugin uses native WebView, you can search online for the same issue adding Following these steps can save you, me, and other people a lot of time, thanks! |
Need to downgrade At least we can run our app until this issue fixed. |
same issue |
1 similar comment
same issue |
i also have the same problem |
same here with Flutter 3.0.3 |
any fix? |
Application Cache API is deprecated, does not compile in Target SDK 33. See pages: --------------------- https://android.googlesource.com/platform/frameworks/base/+/master/core/java/android/webkit/WebSettings.java /** * Sets whether the Application Caches API should be enabled. The default * is {@code false}. Note that in order for the Application Caches API to be * enabled, a valid database path must also be supplied to * {@link #setAppCachePath}. * * @param flag {@code true} if the WebView should enable Application Caches * @deprecated The Application Cache API is deprecated and this method will * become a no-op on all Android versions once support is * removed in Chromium. Consider using Service Workers instead. * See https://web.dev/appcache-removal/ for more information. */ public abstract void setAppCacheEnabled(boolean flag); --------------------- pichillilorenzo/flutter_inappwebview#1223 Build failed on Android Target SDK 33 <...> cannot find symbol settings.setAppCacheEnabled(false); ---------------------
Same issue in flutter 3.0.3 and Dart 2.17.5 |
the solution can be downgrading the API level to 32. It worked for me |
Sadly I have other dependencies that require me to compile for / target API level 33... hope this can be sorted out soon. |
According to my project:
Now I am able to open my App.... |
I encountered the same problem, but after I upgraded Android studio (2021.2.1 patch 1) and gradle (7.3.3), I can set targetsdkversion 33 and compilesdkversion 33, and flutter build apk successful. |
Please solve this issue I am too facing it |
Same here in android native with targetsdkversion 33 and compilesdkversion 33. Anyone who fixed this issue please reply to me soon.
symbol: method setAppCacheEnabled(boolean) |
For android getting same issue @pichillilorenzo please solve it ASAP |
https://developer.android.com/sdk/api_diff/33/changes Removed Methodsvoid setAppCacheEnabled(boolean) | Not sure what the resolution will be |
Getting this issue when using this plugin html_editor_enhanced which uses flutter_inappwebview. Wont be able to downgrade to 32, already at flutter 3.0.5. Works flawlessly in Web, real pain is in compiling for Android |
Hi Guys! So I did a temp fix for people who still have an issue with this Android 33 SDK version.
Add this to your pubspec.yaml. The temp fix we ran through our production web app, didn't seem to cause any crashes or problems. Helped compile the apps properly in Android SDK 33 with flutter 3.0.5. Hope this helps for a while! |
I am also getting the same errors with version |
@pichillilorenzo @rshrc's fork seems to be working fine, can you please look into the changes and maybe a PR can be made and accepted? It is a pain to include forks as dependencies and then switch back to the original at later point keeping an eye on updates. |
I got the same issue. please fix it. |
PS D:\Code\customer main branch\Multivendor-Startt-From-2.0.4-> flutter pub get facing this issue when add this dependency in pubspect.ymal file |
Seems like you used the git repo in the dependency: key, need to use it in dependency_overrides.Share your pubspec.yaml once. |
Any new solution for this problem? I have tried above methods I cannot downgrade sdk version from 33 because system is specifying compilesdk version to be 33 and @rshrc solution gave me a lot of another errors. |
name: eshop_multivendor publish_to: 'none' version: 1.0.0+4 environment: dependencies: cupertino_icons: ^1.0.4 dev_dependencies: flutter: uses-material-design: true assets: fonts: |
i am not using this package any more but still getting this error , how can i resolve any solution ? even i try above solution , also done flutter clean , pub , etc. but no luck there , |
delete pubspec.lock file and run flutter pub get again or run |
deleted pubspec.lock folder and also flutter pub cache repair , but there is no luck . still when i run pub get but i have not use this package in pubspect.ymal file , please help me if have any other solution because i am stucked here |
even for this issue i have done flutter setup again , but still no luck . but i don't know why i am getting this error even i don;t use this packages in my code now but still facing this issue . please help me .,.! |
"Transitive dependency" means your program depends on it, because of a dependency you have that depends on it. To find out which of your dependencies uses which other dependency, you can run:
It will show you a dependency tree with version numbers. Check which package is using |
Some of packages in your pubspec are using it add below to your pubspec to override
|
Thank You so Much For Your Help ...! @rshrc @srihari9n @cvphat ....! I really appreciate your efforts :) and your instance reply and clear explanation ..! finally I've solve my issue . |
Same situation. |
did u find any? |
I solved this problem,-> |
@developer-caleb would you be able to post the differences between those old and new files here? It will be very helpful. |
def flutterRoot = localProperties.getProperty('flutter.sdk') def flutterVersionCode = localProperties.getProperty('flutter.versionCode') def flutterVersionName = localProperties.getProperty('flutter.versionName') apply plugin: 'com.android.application' android {
} flutter { dependencies { cradle-wrapper.properties project/build.gradle
} allprojects { rootProject.buildDir = '../build' task clean(type: Delete) { AndroidManifest.xml add -> android:usesCleartextTraffic="true" if you fix this problem, I will be very happy^^ Good luck! |
Any fix to this issue please |
@developer-caleb Thank you for your response. Based on your comment I changed
and
|
Hello good morning, I was researching and I found a quick solution, as I always get good answers I leave you as a solution in a video. I hope it serves you greetings :D |
Hello.. |
Environment
Device information:
Description
Break when target build version changed to 33 (Tiramisu on Android)
Expected behavior:
Build Complete
Current behavior:
Build Failed
Steps to reproduce
Nothing special to do. My project was able to build on targetSDK 32, but failed on targetSDK 33.
Images
Stacktrace/Logcat
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
/Users/dararii/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.3+7/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:280: error: cannot find symbol
settings.setAppCachePath(options.appCachePath);
^
symbol: method setAppCachePath(String)
location: variable settings of type WebSettings
/Users/dararii/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.3+7/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:494: error: cannot find symbol
settings.setAppCacheEnabled(false);
^
symbol: method setAppCacheEnabled(boolean)
location: variable settings of type WebSettings
/Users/dararii/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.3+7/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:504: error: cannot find symbol
settings.setAppCacheEnabled(true);
^
symbol: method setAppCacheEnabled(boolean)
location: variable settings of type WebSettings
/Users/dararii/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.3+7/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:515: error: cannot find symbol
settings.setAppCachePath(ctx.getCacheDir().getAbsolutePath());
^
symbol: method setAppCachePath(String)
location: variable settings of type WebSettings
/Users/dararii/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.3+7/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:517: error: cannot find symbol
settings.setAppCacheEnabled(true);
^
symbol: method setAppCacheEnabled(boolean)
location: variable settings of type WebSettings
/Users/dararii/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.3+7/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:521: error: cannot find symbol
settings.setAppCacheEnabled(false);
^
symbol: method setAppCacheEnabled(boolean)
location: variable settings of type WebSettings
/Users/dararii/Dev/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_inappwebview-5.4.3+7/android/src/main/java/com/pichillilorenzo/flutter_inappwebview/in_app_webview/InAppWebView.java:767: error: cannot find symbol
settings.setAppCachePath(newOptions.appCachePath);
^
symbol: method setAppCachePath(String)
location: variable settings of type WebSettings
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.
7 errors
FAILURE: Build failed with an exception.
Execution failed for task ':flutter_inappwebview:compileDebugJavaWithJavac'.
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 27s
Exception: Gradle task assembleDebug failed with exit code 1
Exited
The text was updated successfully, but these errors were encountered: