Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 8 days ago.
Improve this question
I have no idea what happened. It was working until yesterday.
When I try to run it now, An error keeps coming.
This is the complete Debug Console Log
Launching lib/main.dart on sdk gphone64 arm64 in debug mode...
../../../../.pub-cache/hosted/pub.dev/syncfusion_flutter_pdf-20.4.49/lib/src/pdf/implementation/forms/pdf_xfdf_document.dart:38:35: Error: The argument type 'String?' can't be assigned to the parameter type 'Object' because 'String?' is nullable and 'Object' isn't.
- 'Object' is from 'dart:core'.
builder.attribute('href', _pdfFilePath);
^
Target kernel_snapshot failed: Exception
FAILURE: Build failed with an exception.
* Where:
Script '/Users/stunntechinnovations/Documents/Softwares/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 1151
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command '/Users/stunntechinnovations/Documents/Softwares/flutter/bin/flutter'' finished with non-zero exit value 1
* 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
I can't seem to find any issues with flutter, dart or any of the configurations.
Flutter doctor -v output given below
[✓] Flutter (Channel stable, 3.7.3, on macOS 13.2 22D49
darwin-arm64, locale en-IN)
• Flutter version 3.7.3 on channel stable at
/Users/stunntechinnovations/Documents/Softwares/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 9944297138 (34 hours ago), 2023-02-08
15:46:04 -0800
• Engine revision 248290d6d5
• Dart version 2.19.2
• DevTools version 2.20.1
[✓] Android toolchain - develop for Android devices (Android SDK
version 33.0.0)
• Android SDK at
/Users/stunntechinnovations/Library/Android/sdk
• Platform android-33, build-tools 33.0.0
• Java binary at: /Applications/Android
Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build
11.0.12+0-b1504.28-7817840)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 14C18
• CocoaPods version 1.11.3
[✓] Chrome - develop for the web
• Chrome at /Applications/Google
Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build
11.0.12+0-b1504.28-7817840)
[✓] VS Code (version 1.75.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.58.0
[✓] Connected device (3 available)
• sdk gphone64 arm64 (mobile) • emulator-5554 • android-arm64
• Android 12 (API 31) (emulator)
• macOS (desktop) • macos • darwin-arm64
• macOS 13.2 22D49 darwin-arm64
• Chrome (web) • chrome • web-javascript
• Google Chrome 110.0.5481.77
[✓] HTTP Host Availability
• All required HTTP hosts are available
• No issues found!
can it be any package-related issues? I tried changing the package versions, but it only seemed to complicate the issue more.
pubspec.yaml
name: kaigo
description: A new Flutter project.
publish_to: 'none'
version: 1.0.0+2
environment:
sdk: ">=2.17.3 <3.0.0"
dependencies:
intl: ^0.18.0
flutter_localizations:
sdk: flutter
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
google_fonts: ^3.0.1
get: ^4.6.5
flutter_screenutil: ^5.5.3+2
bot_toast: ^4.0.2
dropdown_button2: ^1.6.3
flutter_svg: 1.1.1+1
dio: ^4.0.6
shared_preferences: ^2.0.15
dotted_border: ^2.0.0+2
flutter_datetime_picker: ^1.5.1
json_annotation: ^4.6.0
camera: ^0.10.0
path: ^1.8.1
path_provider: ^2.0.11
buttons_tabbar: ^1.3.6
persistent_bottom_nav_bar: ^4.0.2
google_maps_flutter: ^2.1.10
custom_marker: ^1.0.0
image_picker: ^0.8.5+3
firebase_auth:
flutter_spinkit: ^5.1.0
firebase_crashlytics: ^3.0.1
shimmer: ^2.0.0
firebase_core: ^2.4.0
firebase_analytics: any
email_validator: ^2.1.17
readmore: ^2.2.0
multiselect: ^0.0.7
checkbox_grouped: ^1.8.1
qr_code_scanner: ^1.0.1
carousel_slider: ^4.1.1
syncfusion_flutter_pdfviewer: ^20.2.50-beta
cloud_firestore: ^4.0.1
permission_handler: ^10.0.1
flutter_html: ^2.0.0
url_launcher: ^6.1.6
favorite_button: ^0.0.4
firebase_messaging: ^14.0.0
flutter_local_notifications: ^12.0.4
pdf: ^3.8.4
printing: ^5.9.3
open_file: ^3.2.1
expandable: ^5.0.1
bugsnag_flutter: ^2.4.0
visibility_detector: ^0.3.3
dependency_overrides:
flutter_svg: 1.1.1+1
pull_to_refresh: ^2.0.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^2.0.0
json_serializable: ^6.1.4
build_runner: ^2.1.7
flutter_launcher_icons: ^0.10.0
dart_code_metrics: ^5.5.1
flutter_icons:
android: true
ios: true
remove_alpha_ios: true
image_path: "assets/images/logo_opaque.png"
flutter:
generate: true
uses-material-design: true
assets:
- .env.development
- assets/images/
- assets/svgs/
fonts:
- family: NotoSansJP
fonts:
- asset: assets/fonts/NotoSansJP-Thin.otf
weight: 100
- asset: assets/fonts/NotoSansJP-Light.otf
weight: 200
- asset: assets/fonts/NotoSansJP-Light.otf
weight: 300
- asset: assets/fonts/NotoSansJP-Regular.otf
weight: 400
- asset: assets/fonts/NotoSansJP-Medium.otf
weight: 500
- asset: assets/fonts/NotoSansJP-Medium.otf
weight: 600
- asset: assets/fonts/NotoSansJP-Bold.otf
weight: 700
- asset: assets/fonts/NotoSansJP-Bold.otf
weight: 800
- asset: assets/fonts/NotoSansJP-Black.otf
weight: 900
does anybody know how to fix this issue? Any help is appreciated.
Thank you in Advance
Related
When I try to run my flutter project I get the error below. What could be the cause? ......................................................................................................................................................................................................................................................................................................................................................................................................................
Launching lib\main.dart on Android SDK built for x86 in debug mode...
Running Gradle task 'assembleDebug'...
/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/carousel_slider-4.1.1/lib/carousel_slider.dart:268:7: Error: No named parameter with the name 'padEnds'.
padEnds: widget.options.padEnds,
^^^^^^^
/C:/src/flutter/flutter/packages/flutter/lib/src/widgets/page_view.dart:664:3: Context: Found this candidate, but the arguments don't match.
PageView.builder({
^^^^^^^^^^^^^^^^
/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging_platform_interface-3.2.0/lib/src/method_channel/utils/exception.dart:13:11: Error: Method not found: 'Error.throwWithStackTrace'.
Error.throwWithStackTrace(exception, stackTrace);
^^^^^^^^^^^^^^^^^^^
/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging_platform_interface-3.2.0/lib/src/method_channel/utils/exception.dart:16:9: Error: Method not found: 'Error.throwWithStackTrace'.
Error.throwWithStackTrace(
^^^^^^^^^^^^^^^^^^^
/C:/src/flutter/flutter/.pub-cache/hosted/pub.dartlang.org/firebase_messaging_platform_interface-3.2.0/lib/src/method_channel/utils/exception.dart:11:7: Error: A non-null value must be returned since the return type 'Never' doesn't allow null.
Never convertPlatformException(Object exception, StackTrace stackTrace) {
^
FAILURE: Build failed with an exception.
* Where:
Script 'C:\src\flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 1035
* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\src\flutter\flutter\bin\flutter.bat'' finished with non-zero exit value 1
* 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 3m 41s
Exception: Gradle task assembleDebug failed with exit code 1
These are my dependencies in my pubspec.yaml
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.3
# google_fonts: ^2.1.0
google_fonts: 2.2.0
flutter_icons_nullsafty: ^1.0.0
http: ^0.13.3
cached_network_image: ^3.1.0
encrypt: ^5.0.1
flutter_svg: ^0.22.0
qr_flutter: ^4.0.0
clipboard: ^0.1.3
share: ^2.0.4
qr_code_scanner: ^0.5.2
fluro: ^2.0.3
url_launcher: ^6.0.10
image_picker: ^0.8.4
country_code_picker: ^2.0.2
introduction_screen: ^2.1.0
pin_code_fields: ^7.3.0
provider: ^6.0.0
hive: ^2.0.4
hive_flutter: ^1.1.0
flutter_secure_storage: ^4.2.1
local_auth: ^1.1.7
permission_handler: ^8.1.4+2
fl_chart: ^0.40.0
carousel_slider: ^4.0.0
web3dart: ^2.3.1
device_info_plus: ^2.1.0
package_info_plus: ^1.3.0
intl: ^0.17.0
timeago: ^3.1.0
razorpay_flutter: ^1.2.7
flutter_paystack: ^1.0.5+1
flutter_braintree: ^2.0.0+1
loading_overlay: ^0.3.0
lazy_load_scrollview: ^1.3.0
shimmer: ^2.0.0
in_app_review: ^2.0.3
image_cropper: ^1.4.1
ntp: ^2.0.0
uuid: ^3.0.4
cron: ^0.3.2
dotted_border: ^2.0.0+1
translator: ^0.1.7
firebase_core: ^1.6.0
firebase_messaging: ^10.0.9
firebase_analytics: ^8.3.4
firebase_dynamic_links: ^3.0.1
flutter doctor -v response
C:\Users\USER>flutter doctor -v
[√] Flutter (Channel unknown, 2.2.0, on Microsoft Windows [Version 10.0.19041.264], locale en-US)
• Flutter version 2.2.0 at C:\src\flutter\flutter
• Framework revision b22742018b (1 year ago), 2021-05-14 19:12:57 -0700
• Engine revision a9d88a4d18
• Dart version 2.13.0
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at C:\Users\USER\Documents\Sdk
• Platform android-31, build-tools 30.0.2
• ANDROID_HOME = C:\Users\USER\Documents\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.12+7-b1504.28-7817840)
[√] VS Code (version 1.67.1)
• VS Code at C:\Users\USER\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.23.0
[√] Connected device (2 available)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 6.0 (API 23) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 100.0.4896.127
• No issues found!
You are using a too old flutter version. You are using version 2.2.0
padEnds only became exposed in version 2.5.0 as you can see here:
https://docs.flutter.dev/development/tools/sdk/release-notes/release-notes-2.5.0
78558 Expose padEnds on PageView widget
You need to upgrade your flutter. You can do that by writing
flutter upgrade
though it says in your flutter doctor that you are on an unknown channel so maybe you need to do
flutter channel stable
first
My guess is that some dependencies are using deprecated methods (which are removed in the newer Flutter version).
Try the following commands (WARNING: you will most likely have to update your codebase after this, and your packages as well.)
Update Flutter - flutter upgrade
Get dependencies - flutter pub get
Update dependencies flutter pub upgrade
Re-fetch dependencies - flutter pub get
Update your code to the newest version.
Rebuild
After updating some dependency in my pubspec.yaml I started receiving this error "Error: unable to find directory entry in pubspec.yaml: C:\flutter.pub-cache\hosted\pub.dartlang.org\flutter_widget_from_html-0.8.0\test\images". So I don't really know whtat is wrong. Here is my pubspec.yaml
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1
environment:
sdk: ">=2.15.1 <3.0.0"
dependencies:
flutter:
sdk: flutter
cupertino_icons: ^1.0.2
badges: ^2.0.2
cached_network_image: ^3.2.0
cloud_firestore: ^3.1.6
dots_indicator: ^2.0.0
easy_localization: ^3.0.0
firebase_auth: ^3.3.6
firebase_core: ^1.3.0
firebase_messaging: ^11.2.6
firebase_storage: ^10.2.6
flutter_web_browser: ^0.16.0
flutter_html: ^2.1.0
flutter_widget_from_html: ^0.8.0
google_fonts: ^2.1.0
google_sign_in: ^5.0.4
html: ^0.15.0
html_unescape: ^2.0.0
image_picker: ^0.8.1+3
intl: ^0.17.0
introduction_screen: ^2.1.0
launch_review: ^3.0.1
line_icons: ^2.0.1
lottie: ^1.1.0
package_info: ^2.0.2
path_provider: ^2.0.2
provider: ^6.0.0
share: ^2.0.4
shared_preferences: ^2.0.6
skeleton_text: ^3.0.0
fluttertoast: ^8.0.7
flutter_math_fork: ^0.4.0
flutter_svg: ^0.22.0
url_launcher: ^6.0.9
youtube_player_flutter: ^8.0.0
youtube_plyr_iframe: ^2.0.7
rounded_loading_button: ^2.0.5
firebase_analytics: ^9.1.0
flutter_facebook_auth: ^4.0.1
the_apple_sign_in: ^1.1.1
video_player: ^2.1.10
flick_video_player: ^0.4.0-dev
flutter_icons:
git:
url: https://github.com/adarsh-technocrat/flutter-icons
md2_tab_indicator:
git:
url: https://github.com/westdabestdb/md2_tab_indicator
google_mobile_ads: ^1.0.1
facebook_audience_network: ^1.0.0-nullsafety.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.0
flutter_launcher_icons: "^0.9.0"
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/images/icon.png"
flutter:
uses-material-design: true
assets:
- assets/images/
- assets/animation_files/
- assets/translations/
fonts:
- family: Poppins
fonts:
- asset: assets/fonts/Poppins-Light.ttf
weight: 400
- asset: assets/fonts/Poppins-Regular.ttf
weight: 500
- asset: assets/fonts/Poppins-Medium.ttf
weight: 600
- asset: assets/fonts/Poppins-SemiBold.ttf
weight: 700
- asset: assets/fonts/Poppins-Bold.ttf
weight: 800
- family: Open Sans
fonts:
- asset: assets/fonts/OpenSans-Light.ttf
weight: 400
- asset: assets/fonts/OpenSans-Regular.ttf
weight: 500
- family: Manrope
fonts:
- asset: assets/fonts/Manrope-Regular.ttf
weight: 400
- asset: assets/fonts/Manrope-SemiBold.ttf
weight: 500
- asset: assets/fonts/Manrope-Medium.ttf
weight: 600
- asset: assets/fonts/Manrope-Bold.ttf
weight: 700
- asset: assets/fonts/Manrope-ExtraBold.ttf
weight: 900
And here is my flutter doctor -v
[√] Flutter (Channel stable, 2.8.1, on Microsoft Windows [Version 10.0.18362.53], locale en-US)
• Flutter version 2.8.1 at C:\flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935af4d (7 weeks ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1
[√] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
• Android SDK at C:\Users\USER\AppData\Local\Android\sdk
• Platform android-32, build-tools 32.0.0
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
• All Android licenses accepted.
[√] Chrome - develop for the web
• Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe
[√] Android Studio (version 2020.3)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7249189)
[√] Connected device (3 available)
• itel P651W (mobile) • 062983715I011447 • android-arm • Android 10 (API 29)
• Chrome (web) • chrome • web-javascript • Google Chrome 97.0.4692.99
• Edge (web) • edge • web-javascript • Microsoft Edge 97.0.1072.62
• No issues found!
You just need to upgrade to v0.8.1+1
Reference: https://github.com/daohoangson/flutter_widget_from_html/issues/618#issuecomment-950555416
When I'm triying to compile my apk in my device using flutter run, I always get the same error ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method getAll on channel plugins.flutter.io/shared_preferences
I have tried a lot of configurations but nothing, I'm so desperate, I need to solve this error for to continue in my work..... :( :(
Here is my flutter doctor:
[√] Flutter (Channel beta, 1.25.0-8.3.pre, on Microsoft Windows [Versión 10.0.10240], locale es-ES)
• Flutter version 1.25.0-8.3.pre at C:\sdk\flutter
• Framework revision 5d36f2e7f5 (2 weeks ago), 2021-01-14 15:57:49 -0800
• Engine revision 7a8f8ca02c
• Dart version 2.12.0 (build 2.12.0-133.7.beta)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at C:\Users\prog10\AppData\Local\Android\Sdk
• Platform android-30, build-tools 30.0.3
• ANDROID_HOME = C:\Users\prog10\AppData\Local\Android\Sdk
• ANDROID_SDK_ROOT = C:\Users\prog10\AppData\Local\Android\Sdk
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Android Studio (version 4.1.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code, 64-bit edition (version 1.52.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Flutter extension version 3.18.1
[√] Connected device (1 available)
• POCOPHONE F1 (mobile) • android-arm64 • Android 10 (API 29)
• No issues found!
My pubsec.yaml's configuration is the following:
name: myapp
description: App
version: 1.0.0+1
environment:
sdk: ">=2.2.2 <4.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
flutter_launcher_icons: ^0.7.2
provider: ^3.2.0
splashscreen: ^1.2.0
http: ^0.12.0+2
shared_preferences: ^0.5.3+4
cupertino_icons: ^0.1.2
image_picker: ^0.6.0+3
cached_network_image: ^2.0.0-rc
flutter_html: ^0.10.4
datetime_picker_formfield:
path: ./assets/packages/datetime_picker_formfield/
intl: ">=0.15.8 <1.0.0"
table_calendar: ^2.0.1
photo_view: ^0.7.0
firebase_core: 0.4.4
firebase_auth: 0.15.3
# cloud_firestore: ^0.12.9+4
cloud_firestore: ^0.13.4
firebase_messaging: ^5.1.6
flutter_image_compress: ^0.6.3
maps_launcher: ^1.2.0
barcode_scan: ^1.0.0
flutter_inappwebview: ^2.1.0+1
flutter_share: ^1.0.2+1
path_provider: ^1.6.5
dev_dependencies:
flutter_test:
sdk: flutter
flutter_icons:
android: true
ios: true
image_path: assets/icon-paciente.png
image_path_ios: assets/icon-paciente.png
flutter:
uses-material-design: true
assets:
- assets/loader.gif
- assets/logo.png
- assets/logo-header.png
- assets/icon.png
- assets/icon-dark.png
- assets/icon-paciente.png
- assets/placeholder.png
- assets/patient1.jpg
- assets/patient2.jpg
- assets/patient3.jpg
- assets/medicamento1.jpg
- assets/medicamento2.jpg
- assets/medicamento3.jpg
- assets/paypal.png
- assets/paypal.jpg
fonts:
- family: Comfortaa
fonts:
- asset: assets/fonts/Comfortaa-Light.ttf
- asset: assets/fonts/Comfortaa-Medium.ttf
- asset: assets/fonts/Comfortaa-Regular.ttf
- asset: assets/fonts/Comfortaa-SemiBold.ttf
- asset: assets/fonts/Comfortaa-Bold.ttf
I want to know where is the problem, please anybody can help me?
It seems like some of your project's plugin is crashing. In VS code there is an extension called Version Lens which might be of help on managing plugins versions. You can also run your project in Android Studio and check logcat for exceptions. Upgrade/change plugins that crash.
In my case, I added this line within the main() and the error goes away:
SharedPreferences.setMockInitialValues({});
With that said, you should still try uninstall/ reinstall the app after flutter clean. If nothing change, the above method should work as expected
In my case, I only do flutter clean then close and restart IDE. and increase the version of my plugin you can try it once
shared_preferences: ^0.5.3+4
And then flutter pub get. I hope this will work for you
I had this error myself pretty recently. This comment on a github issue helped me out.
They say to change the proguard files in /android/app/build.gradle from
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
to
buildTypes {
release {
signingConfig signingConfigs.release
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
That's just changing the default proguard file from proguard-android.txt to proguard-android-optimize.txt.
If this solution doesn't work, it would be worthwhile to read through everything on that issue.
Error appears when performing
flutter build apk --release
and
flutter build apk
There is no error when I build the APK without having the firebase_admob
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
Building plugin firebase_admob...
The plugin firebase_admob could not be built due to the issue above.
I have performed
flutter doctor --android-licenses
flutter clean
The error still appears.
Below is the flutter doctor -v result
[√] Flutter (Channel stable, 1.20.4, on Microsoft Windows [Version 10.0.18362.1082], locale en-US)
• Flutter version 1.20.4 at D:\work\flutter
• Framework revision fba99f6cf9 (2 weeks ago), 2020-09-14 15:32:52 -0700
• Engine revision d1bc06f032
• Dart version 2.9.2
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at D:\work\AndroidSDK
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = D:\work\AndroidSDK
• ANDROID_SDK_ROOT = D:\work\AndroidSDK
• Java binary at: D:\aplikasi\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Android Studio (version 4.0)
• Android Studio at D:\aplikasi\Android Studio
• Flutter plugin version 49.0.2
• Dart plugin version 193.7547
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] Connected device (1 available)
• AOSP on IA Emulator (mobile) • emulator-5554 • android-x86 • Android 9 (API 28) (emulator)
• No issues found!
Pubspec.yaml
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
intl: ^0.16.0
sqflite: "^0.11.0+1"
flutter_launcher_icons: "^0.8.0"
image_picker: "0.6.1"
path_provider: ^1.6.16
path: ^1.7.0
provider: ^4.0.1
date_util: ^0.1.4
auto_size_text: ^2.1.0
flutter_masked_text: ^0.7.0
font_awesome_flutter: ^8.8.1
firebase_admob: ^0.9.0+9
flutter_icons:
android: "launcher_icon"
ios: true
image_path: "assets/icon/penqu.png"
cupertino_icons: ^0.1.3
dev_dependencies:
flutter_test:
sdk: flutter
module:
androidX: true
I managed to fix the issue using different package version
and add firebase_core.
firebase_admob: ^0.9.0+9
Then I made change to the gradle.properties file as follow
The change was gradle-4.10.2-all.zip to gradle-5.1.1-all.zip
why?
cuz it appears in the error message.
#Thu Nov 01 21:03:34 PDT 2018
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
I recently published an application on google play, and I received an email from the google play team which says: ...and found that your app uses software that contains security vulnerabilities for users. Apps with these vulnerabilities can expose user information or damage a user’s device, and may be considered to be in violation of our Malicious Behavior policy.
Below is the list of issues and the corresponding APK versions that were detected in your recent submission. Please migrate your apps to use the updated software as soon as possible and increment the version number of the upgraded APK.
Vulnerability : TrustManager
My application was developed with Flutter...
I really don't know how to fix this, if you can help me.
pubspec.yaml
name: ...
description: ...
version: 1.0.1+2
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
#bottom_navy_bar: ^5.3.2
http: ^0.12.2
shared_preferences: ^0.5.6+1
location: ^2.3.5
sqflite: ^1.2.0
path_provider: ^1.6.0
image_picker: ^0.6.3+1
intl: ^0.16.1
country_code_picker: ^1.2.4
multi_image_picker: ^4.6.1
firebase_auth: ^0.16.1
image_cropper: ^1.2.1
validators: ^2.0.0+1
firebase_messaging: ^6.0.9
esys_flutter_share: ^1.0.2
photo_view: ^0.9.1
material_design_icons_flutter: ^3.4.4895
url_launcher: ^5.4.1
cached_network_image: ^2.0.0
encrypt: ^4.0.0
flutter_local_notifications: ^1.1.6
r_scan: ^0.1.3+2
permission_handler: ^4.2.0+hotfix.3
native_contact_picker: ^0.0.6
qr_utils:
path: packages/qr_utils
libphonenumber: ^1.0.1
flutter_cache_manager: ^1.1.3
csv: ^4.0.3
excel: ^1.0.2
pdf: ^1.5.0
printing: any
flutter_swiper: ^1.1.6
flutter_rating_bar: ^3.0.1+1
flutter_native_admob: ^2.1.0
dev_dependencies:
flutter_test:
sdk: flutter
flutter:
uses-material-design: true
assets:
- assets/images/
code
String url = "https://exemple.com/resources/users/1";
try {
final response = await http.get(url);
if (response.statusCode == 200) {
//parse user
}
} on SocketException {
} catch (ex) {
print(ex.toString());
}
return null;
flutter doctor
[√] Flutter (Channel stable, v1.17.3, on Microsoft Windows [version 10.0.10240], locale fr-FR)
• Flutter version 1.17.3 at C:\souces\flutter
• Framework revision b041144f83 (8 weeks ago), 2020-06-04 09:26:11 -0700
• Engine revision ee76268252
• Dart version 2.8.4
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
• Android SDK at D:\android\android-sdk-windows
• Platform android-30, build-tools 30.0.0
• ANDROID_HOME = D:\android\android-sdk-windows
• Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
• All Android licenses accepted.
[√] Android Studio (version 4.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Flutter plugin version 46.0.2
• Dart plugin version 193.7361
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
[√] VS Code (version 1.46.0)
• VS Code at C:\Users\User\AppData\Local\Programs\Microsoft VS Code
• Flutter extension version 3.12.2
[√] Connected device (1 available)
• TECNO WX4 • 0257309828005184 • android-arm • Android 7.0 (API 24)
• No issues found!
It's probably caused by the r_scan library as it uses custom implementation of the X509TrustManager. See this issue.