I'm trying to build the apk of my project but I got:
* What went wrong:
Execution failed for task ':audioplayers:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
> Android resource linking failed
ERROR:C:\Users\pc\.gradle\caches\transforms-3\1c118aff0ddf4faaf93ec03867fed550\transformed\core-1.9.0-rc01\res\values\values.xml:104:5-113:25: AAPT: error: resource android:attr/lStar not found.
I don't know what this means, nor how to solve it, I saw online that I should have this line
implementation "androidx.core:core-ktx:1.6.0"
in mine app/build.grande but I tried and nothing changes.
Plugins I'm currently using:
cupertino_icons: ^1.0.5
path_provider: ^2.0.11
encrypt: ^5.0.1
flutter_speed_dial: ^6.0.0
telephony: ^0.2.0
audioplayers: any
flutter_audio_recorder2: ^0.0.2
flutter_local_notifications: ^9.7.0
flutter_launcher_icons: ^0.9.0
camera: ^0.10.0+1
image_picker: any
imgur: any
permission_handler: ^10.0.0
flutter_sms: ^2.3.3
audio_session: ^0.1.10
flutter_sound: ^9.2.13
flutter_sound_platform_interface: ^9.2.13
lottie: ^1.4.1
file_picker: ^5.0.1
environment: ^0.0.2
argon_buttons_flutter: ^1.1.0
flutter_native_splash: ^2.2.7
background_sms: ^0.0.4
animations: ^2.0.3
Override the http package to the latest one by including dependency_overrides in the pubspec.yaml. It's going to be like the following:
dependency_overrides:
http:
version: ">=0.13.5"
Also, set audioplayers version to ^1.0.1.
dependencies:
audioplayers: ^1.0.1
# ...
Related
I'm trying to build my flutter project but I'm getting this error so I'm just wondering how can I fix this. This happens after adding the Cookie Manager plugin. I can run the app on an emulator and physical device without any problem but it gives me this error when I try to build it.
Podfile
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
use_frameworks!
pubspec.yaml
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: ^1.0.2
lottie: ^1.2.1
hive: ^2.0.4
hive_flutter: ^1.1.0
flutter_hooks: ^0.16.0-nullsafety.0
hooks_riverpod: ^0.13.1
http: ^0.13.3
flutter_svg: ^0.22.0
flutter_facebook_auth: ^3.5.2
carousel_slider: ^4.0.0
modal_bottom_sheet: ^2.0.0
flutter_html: ^2.1.1
flutter_spinkit: ^5.0.0
jiffy: ^4.1.0
share: ^2.0.4
google_sign_in: ^5.1.1
wp_json_api: ^3.0.0
fluttertoast: ^8.0.8
flutter_tts: ^3.2.2
email_validator: ^2.0.1
onesignal_flutter: ^3.2.7
google_mobile_ads: ^0.13.3
url_launcher: ^6.0.9
sticky_headers: ^0.2.0
flutter_styled_toast: ^2.0.0
flutter_math_fork: 0.4.2+2
persistent_bottom_nav_bar: ^4.0.2
provider: ^6.0.2
path_provider: ^2.0.8
flutter_launcher_icons: "^0.9.2"
webview_flutter: ^2.0.4
webview_cookie_manager: ^2.0.0
shared_preferences: ^2.0.12
I'm a newbie in flutter, what should I do in this case?
Thank you all.
This is the Error message
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)
Error on line 14, column 6 of pubspec.yaml: Expected ':'.
dds: 2.0.4
^
and in the line 14, it's a comment out like this
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
I can't figure it out what cause this error
This is my pubspec.yaml file
version: 1.0.0+1
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
firebase_auth: ^3.1.4
cloud_firestore: ^2.5.3
firebase_core: ^1.8.0
firebase_storage: ^10.0.6
provider: ^6.0.1
image_picker: ^0.8.4+3
file_picker: ^4.1.6
transparent_image: ^2.0.0
shared_preferences: ^2.0.8
qr_code_scanner: ^0.5.2
cupertino_listview: ^2.0.0
zefyr: ^0.12.0
cupertino_icons: ^1.0.2
image_picker_for_web: ^2.1.4
firebase_storage_web: ^3.0.4
shared_preferences_web: ^2.0.2
url_launcher_web: ^2.0.4
dev_dependencies:
flutter_test:
sdk: flutter
flutter_lints: ^1.0.0
flutter:
uses-material-design: true
assets:
- assets/images/
When I use flutter command, it always jump out
This is the Error message
Error: Unable to 'pub upgrade' flutter tool. Retrying in five seconds... (9 tries left)
Error on line 14, column 6 of pubspec.yaml: Expected ':'.
dds: 2.0.4
^
Because no versions of shared_preferences match >2.0.5 <3.0.0 and shared_preferences 2.0.5 depends on shared_preferences_windows ^2.0.0, shared_preferences ^2.0.5 requires shared_preferences_windows ^2.0.0.
And because no versions of shared_preferences_windows match >2.0.0 <3.0.0 and shared_preferences_windows 2.0.0 depends on path_provider_windows ^2.0.0, shared_preferences ^2.0.5 requires path_provider_windows ^2.0.0.
Because stream_chat_flutter >=1.0.0-beta <2.0.0-nullsafety.0 depends on path_provider ^1.6.27 which depends on path_provider_windows ^0.0.4, stream_chat_flutter >=1.0.0-beta <2.0.0-nullsafety.0 requires path_provider_windows ^0.0.4.
Thus, shared_preferences ^2.0.5 is incompatible with stream_chat_flutter >=1.0.0-beta <2.0.0-nullsafety.0.
So, because jitsist depends on both shared_preferences ^2.0.5 and stream_chat_flutter ^1.0.0, version solving failed.
pub get failed (1; So, because jitsist depends on both shared_preferences ^2.0.5 and stream_chat_flutter ^1.0.0, version solving failed.)
version: 1.0.0+1
environment:
sdk: ">=2.7.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
jitsi_meet: ^0.1.0
form_field_validator: ^1.0.1
cupertino_icons: ^1.0.3
firebase_auth:
pin_code_fields: ^6.0.1
cloud_firestore:
firebase_core:
table_calendar: ^3.0.0
page_transition: "^1.1.7+6"
shared_preferences: ^2.0.5
stream_chat_flutter: ^1.0.0
dependency_overrides:
intl: ^0.17.0-nullsafety.2
dev_dependencies:
flutter_test:
sdk: flutter
name: stream_chat
stream_chat_flutter: ^latest version
change name: .... name you want
I was trying to add audioplayers: ^0.13.2 to the pubsec.yaml file.
At first it was working then after a while when I run the app there's an error in the Build:
Could not determine the dependencies of task ':audioplayers:compileDebugAidl'.
Failed to find target with hash string 'android-28' in: C:\Users\myRepo\AppData\Local\Android\sdk
My pubsec:
flutter:
sdk: flutter
http: ^0.12.2
firebase_database: ^6.0.0
audioplayers: ^0.7.8
firebase_messaging: ^7.0.3
This errors shows up on terminal and I have checked everything since yesterday trying to find the duplicated dependencies but I couldn't find it.
This is the error:
Duplicate class com.google.android.gms.measurement.internal.zzik found in modules jetified-play-services-measurement-base-17.5.0-runtime.jar (com.google.android.gms:play-services-measurement-base:17.5.0) and jetified-play-services-measurement-impl-17.4.1-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.4.1)
This is my pubspec.yaml:
firebase_core: 0.5.0
cloud_firestore:
firebase_storage: ^4.0.0
firebase_auth: ^0.18.0
google_sign_in: ^4.5.6
location: 3.0.2
google_maps_flutter: ^0.5.27+3
font_awesome_flutter: 8.4.0
geolocator: ^5.1.2
cupertino_icons: ^0.1.3
appodeal_flutter: ^0.5.0
firebase_messaging: ^7.0.2
intro_slider: ^2.3.3
shared_preferences: ^0.5.12
translator: ^0.1.5
loading: ^1.0.2
permission_handler: ^5.0.1+1
beauty_textfield: ^0.0.1
snaplist: ^0.1.8
image_picker: ^0.6.7+11
geoflutterfire: 2.2.1
path_provider: ^1.6.18
image: ^2.1.18
uuid: ^2.2.2
datetime_picker_formfield: ^1.0.0
share: ^0.6.5+2