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

Build APK Android failed #25

Open
felipe-bambu opened this issue Jan 23, 2025 · 2 comments
Open

Build APK Android failed #25

felipe-bambu opened this issue Jan 23, 2025 · 2 comments

Comments

@felipe-bambu
Copy link

felipe-bambu commented Jan 23, 2025

Description

When generating the APK using the flutter build apk command and having the infobip_mobilemessaging package integrated, it tells me that I have to use version 1.8.10 of kotlin, but when updating kotlin to that version and trying to generate the apk again, it gives me the following errors

`FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:checkReleaseAarMetadata'.

Could not resolve all files for configuration ':app:releaseRuntimeClasspath'.
Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.10.
Required by:
project :app
> Cannot find a version of 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' that satisfies the version constraints:
Dependency path 'android:app:unspecified' --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.10'
Dependency path 'android:app:unspecified' --> 'android:infobip_mobilemessaging:1.0' (releaseRuntimeElements) --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:{strictly 1.8.10}'
Dependency path 'android:app:unspecified' --> 'com.example.video_compress:video_compress:1.0-SNAPSHOT' (releaseRuntimeElements) --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10'
Constraint path 'android:app:unspecified' --> 'io.flutter.plugins.imagepicker:image_picker_android:1.0-SNAPSHOT' (releaseRuntimeElements) --> 'org.jetbrains.kotlin:kotlin-bom:1.8.22' (platform-runtime) --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22'
Dependency path 'android:app:unspecified' --> 'com.example.video_compress:video_compress:1.0-SNAPSHOT' (releaseRuntimeElements) --> 'com.otaliastudios:transcoder:0.10.5' (releaseRuntimePublication) --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30'
Dependency path 'android:app:unspecified' --> 'com.example.video_compress:video_compress:1.0-SNAPSHOT' (releaseRuntimeElements) --> 'com.otaliastudios:transcoder:0.10.5' (releaseRuntimePublication) --> 'com.otaliastudios.opengl:egloo:0.6.1' (releaseRuntimePublication) --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.20'
Dependency path 'android:app:unspecified' --> 'io.flutter.plugins.imagepicker:image_picker_android:1.0-SNAPSHOT' (releaseRuntimeElements) --> 'androidx.activity:activity:1.7.2' (releaseVariantReleaseRuntimePublication) --> 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1' (releaseVariantReleaseRuntimePublication) --> 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4' (runtimeElements) --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21'
Dependency path 'android:app:unspecified' --> 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' (releaseRuntimeElements) --> 'io.flutter:flutter_embedding_release:1.0.0-d44b5a94c976fbb65815374f61ab5392a220b084' (runtime) --> 'androidx.window:window-java:1.0.0-beta04' (releaseVariantReleaseRuntimePublication) --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4' (jvmRuntimeElements-published) --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4' (jvmRuntimeElements-published) --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21'

Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:{strictly 1.8.10}.
Required by:
project :app > project :infobip_mobilemessaging
> Cannot find a version of 'org.jetbrains.kotlin:kotlin-stdlib-jdk8' that satisfies the version constraints:
Dependency path 'android:app:unspecified' --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.10'
Dependency path 'android:app:unspecified' --> 'android:infobip_mobilemessaging:1.0' (releaseRuntimeElements) --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:{strictly 1.8.10}'
Dependency path 'android:app:unspecified' --> 'com.example.video_compress:video_compress:1.0-SNAPSHOT' (releaseRuntimeElements) --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10'
Constraint path 'android:app:unspecified' --> 'io.flutter.plugins.imagepicker:image_picker_android:1.0-SNAPSHOT' (releaseRuntimeElements) --> 'org.jetbrains.kotlin:kotlin-bom:1.8.22' (platform-runtime) --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.8.22'
Dependency path 'android:app:unspecified' --> 'com.example.video_compress:video_compress:1.0-SNAPSHOT' (releaseRuntimeElements) --> 'com.otaliastudios:transcoder:0.10.5' (releaseRuntimePublication) --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30'
Dependency path 'android:app:unspecified' --> 'com.example.video_compress:video_compress:1.0-SNAPSHOT' (releaseRuntimeElements) --> 'com.otaliastudios:transcoder:0.10.5' (releaseRuntimePublication) --> 'com.otaliastudios.opengl:egloo:0.6.1' (releaseRuntimePublication) --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.20'
Dependency path 'android:app:unspecified' --> 'io.flutter.plugins.imagepicker:image_picker_android:1.0-SNAPSHOT' (releaseRuntimeElements) --> 'androidx.activity:activity:1.7.2' (releaseVariantReleaseRuntimePublication) --> 'androidx.lifecycle:lifecycle-viewmodel-savedstate:2.6.1' (releaseVariantReleaseRuntimePublication) --> 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.4' (runtimeElements) --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21'
Dependency path 'android:app:unspecified' --> 'io.flutter.plugins.firebase.core:firebase_core:1.0-SNAPSHOT' (releaseRuntimeElements) --> 'io.flutter:flutter_embedding_release:1.0.0-d44b5a94c976fbb65815374f61ab5392a220b084' (runtime) --> 'androidx.window:window-java:1.0.0-beta04' (releaseVariantReleaseRuntimePublication) --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4' (jvmRuntimeElements-published) --> 'org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.4' (jvmRuntimeElements-published) --> 'org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.6.21'`

Environment

  • Package Version: infobip_mobilemessaging: 6.3.0
  • Kotlin Version: 1.8.10
  • Flutter Version: 3.10.0

My question is, how could I correct the problem to generate the apk correctly?

@alboldy-ib
Copy link
Contributor

Hello there,

Have you performed flutter clean after introducing changes into gradle files? Also invalidating caches in Android Studio is required.

I would also require result of running flutter doctor -v as well as pubspeck.yaml to further check this request.

@felipe-bambu
Copy link
Author

felipe-bambu commented Jan 24, 2025

Hi @alboldy-ib , yes I have performed the actions you mentioned, I leave you the results of the execution of the commands, for more context.

developer@os app % flutter clean

Cleaning Xcode workspace... 11.6s
Deleting build... 12.6s
Deleting .dart_tool... 2,588ms
Deleting Generated.xcconfig... 1ms
Deleting flutter_export_environment.sh... 0ms
Deleting Flutter.podspec... 0ms
Deleting .flutter-plugins-dependencies... 0ms
Deleting .flutter-plugins... 0ms

developer@os app % flutter doctor -v

[✓] Flutter (Channel Stable, 3.10.0, on macOS 14.5 23F79 darwin-arm64, locale es-MX)
• Flutter version 3.10.0 on Stable channel at /Users/developer/Documents/flutter
• Framework revision 84a1e904f4 (1 year, 9 months ago), 2023-05-09 07:41:44 -0700
• Engine revision d44b5a94c9
• Dart version 3.0.0
• DevTools version 2.23.1

[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
• Android SDK at /Users/developer/Library/Android/sdk
• Platform android-34, 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.13+0-b1751.21-8125866)
• All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 15.3)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Build 15E204a
• CocoaPods version 1.15.2

[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2021.3)
• 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.13+0-b1751.21-8125866)

[✓] VS Code (version 1.96.2)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.102.0

[✓] Connected device (2 available)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.5 23F79 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 132.0.6834.110

[✓] Network resources
• All expected network resources are available.

pubspec.yaml

environment:
sdk: ">=3.0.0 <4.0.0"

dependencies:
flutter:
sdk: flutter
flutter_localizations:
sdk: flutter
cupertino_icons: ^1.0.2
intl: ^0.18.0
shared_preferences: ^2.0.15
lottie: ^1.4.1
flutter_svg: ^1.1.4
card_swiper: ^2.0.4
flutter_multi_formatter: ^2.6.1
http: ^0.13.5
flutter_bloc: ^8.1.1
pin_code_fields: ^7.4.0
url_launcher: ^6.1.5
video_player: ^2.4.7
youtube_player_flutter: ^8.1.0
google_fonts: ^4.0.0
firebase_core: ^1.22.0
firebase_storage: ^10.3.7
firebase_messaging: ^13.0.1
firebase_remote_config: ^2.0.20
dynamic_cached_fonts: ^1.0.0
from_css_color: ^2.0.0
webview_flutter: ^3.0.4
flutter_widget_from_html: ^0.8.5
device_info_plus: ^7.0.0
stop_watch_timer: ^2.0.0
google_maps_flutter: ^2.2.1
image_picker: ^0.8.6
dio: ^4.0.6
rxdart: ^0.27.5
syncfusion_flutter_pdfviewer: ^20.2.50-beta
dotted_border: ^2.0.0+3
geolocator: ^9.0.2
provider: ^6.0.5
file_picker: ^5.2.5
flutter_share: ^2.0.0
mime: ^1.0.4
flutter_local_notifications: ^15.1.0+1
path_provider: ^2.1.0
uni_links: ^0.5.1
webview_flutter_plus: ^0.3.0+2
web_socket_channel: ^2.4.0
video_compress: ^3.1.3
qr_flutter: ^4.1.0
mobile_scanner: ^3.5.7
infobip_mobilemessaging: ^6.3.0

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

2 participants