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

Jetifier "partially migrated" warning on Android build #82

Open
under3415 opened this issue Feb 11, 2023 · 5 comments
Open

Jetifier "partially migrated" warning on Android build #82

under3415 opened this issue Feb 11, 2023 · 5 comments

Comments

@under3415
Copy link

Getting this warning when building Android app.
I am using just_audio package, but I belive the warning is coming from audio_session.

WARNING: [Processor] Library 'C:\Users\Username.gradle\caches\modules-2\files-2.1\androidx.media2\media2-session\1.2.0\e110e7db678fbfc107af48fe6110e3cc713f4564\media2-session-1.2.0.aar' contains references to both AndroidX
and old support library. This seems like the library is partially migrated. Jetifier will try to rewrite the library anyway.
Example of androidX reference: 'androidx/media2/session/MediaBrowser$Builder'
Example of support library reference: 'android/support/v4/media/session/MediaSessionCompat$Token'

Not sure if this is related, but I am also getting this error from the Google Play Store testing devices

Native crash of /system/bin/audioserver

Flutter Doctor output below:

[√] Flutter (Channel stable, 3.7.3, on Microsoft Windows [Version 10.0.19045.2546], locale en-US)
    • Flutter version 3.7.3 on channel stable at C:\src\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 9944297138 (2 days ago), 2023-02-08 15:46:04 -0800
    • Engine revision 248290d6d5
    • Dart version 2.19.2
    • DevTools version 2.20.1

[√] Windows Version (Installed version of Windows is version 10 or higher)

[√] Android toolchain - develop for Android devices (Android SDK version 33.0.1) 
    • Android SDK at C:\Users\userName\AppData\Local\Android\sdk
    • Platform android-33, build-tools 33.0.1
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java       
    • Java version OpenJDK Runtime Environment (build 11.0.15+0-b2043.56-8887301)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.11.17)    
    • Visual Studio at C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools
    • Visual Studio Build Tools 2019 version 16.11.32630.194
    • Windows 10 SDK version 10.0.19041.0

[√] Android Studio (version 2022.1)
    • 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.15+0-b2043.56-8887301)

[√] VS Code (version 1.75.1)
    • VS Code at C:\Users\userName\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.58.0

[√] Connected device (3 available)
    • Windows (desktop) • windows • windows-x64    • Microsoft Windows [Version 10.0.19045.2546]
    • Chrome (web)      • chrome  • web-javascript • Google Chrome 108.0.5359.125
    • Edge (web)        • edge    • web-javascript • Microsoft Edge 109.0.1518.78

[√] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!
@ryanheise
Copy link
Owner

Yes, that's a known issue with AndroidX which last I checked they haven't fixed yet. Although they say it is harmless.

@fuzzball1980
Copy link

Im getting the same issue and after the warning I got the following error.. any idea?

Codemagic Deploy Output
Failed Step: Build AAB with Flutter

Running "flutter pub get" in clone...
Resolving dependencies...
_fe_analyzer_shared 58.0.0 (60.0.0 available)
_flutterfire_internals 1.0.10 (1.3.1 available)
algolia 1.1.1 (1.1.2 available)
analyzer 5.10.0 (5.12.0 available)
async 2.10.0 (2.11.0 available)
badges 2.0.2 (3.1.1 available)
build 2.3.1 (2.4.0 available)
build_daemon 3.1.1 (4.0.0 available)
build_runner 2.3.3 (2.4.4 available)
build_runner_core 7.2.7 (7.2.8 available)
built_value 8.4.3 (8.5.0 available)
built_value_generator 8.4.3 (8.5.0 available)
cached_network_image 3.2.1 (3.2.3 available)
cached_network_image_platform_interface 1.0.0 (2.0.0 available)
cached_network_image_web 1.0.1 (1.0.2 available)
characters 1.2.1 (1.3.0 available)
chewie 1.4.0 (1.5.0 available)
cli_util 0.3.5 (0.4.0 available)
cloud_firestore 4.2.0 (4.7.1 available)
cloud_firestore_platform_interface 5.9.1 (5.14.1 available)
cloud_firestore_web 3.1.1 (3.5.1 available)
cloud_functions 4.0.6 (4.3.1 available)
cloud_functions_platform_interface 5.1.25 (5.4.1 available)
cloud_functions_web 4.3.14 (4.5.1 available)
collection 1.17.0 (1.17.2 available)
csv 5.0.1 (5.0.2 available)
dom_tools 2.1.8 (2.1.17 available)
dropdown_button2 2.0.0 (2.1.2 available)
easy_debounce 2.0.1 (2.0.3 available)
equatable 2.0.3 (2.0.5 available)
file_picker 5.2.6 (5.3.0 available)
firebase_analytics 10.0.7 (10.4.1 available)
firebase_analytics_platform_interface 3.3.15 (3.6.1 available)
firebase_analytics_web 0.5.1+6 (0.5.4+1 available)
firebase_auth 4.2.0 (4.6.1 available)
firebase_auth_platform_interface 6.11.4 (6.15.1 available)
firebase_auth_web 5.2.0 (5.5.1 available)
firebase_core 2.4.0 (2.13.0 available)
firebase_core_platform_interface 4.5.2 (4.8.0 available)
firebase_core_web 2.0.2 (2.5.0 available)
firebase_crashlytics 3.0.7 (3.3.1 available)
firebase_crashlytics_platform_interface 3.3.8 (3.6.1 available)
firebase_messaging 14.1.4 (14.6.1 available)
firebase_messaging_platform_interface 4.2.8 (4.5.1 available)
firebase_messaging_web 3.2.9 (3.5.1 available)
firebase_remote_config 3.0.7 (4.2.1 available)
firebase_remote_config_platform_interface 1.1.27 (1.4.1 available)
firebase_remote_config_web 1.1.16 (1.4.1 available)
firebase_storage 11.0.7 (11.2.1 available)
firebase_storage_platform_interface 4.1.25 (4.4.1 available)
firebase_storage_web 3.3.17 (3.6.1 available)
flutter_facebook_auth_platform_interface 3.2.0 (4.1.1 available)
flutter_facebook_auth_web 3.2.0 (4.1.1 available)
flutter_launcher_icons 0.12.0 (0.13.1 available)
flutter_plugin_android_lifecycle 2.0.9 (2.0.14 available)
font_awesome_flutter 10.1.0 (10.4.0 available)
go_router 3.1.0 (7.0.1 available)
google_api_headers 1.3.0 (1.6.0 available)
google_fonts 4.0.3 (4.0.4 available)
google_sign_in 6.0.2 (6.1.0 available)
google_sign_in_android 6.1.8 (6.1.14 available)
google_sign_in_ios 5.6.1 (5.6.2 available)
google_sign_in_web 0.11.0+2 (0.12.0 available)
image_picker 0.8.5+3 (0.8.7+5 available)
image_picker_android 0.8.5+3 (0.8.6+15 available)
image_picker_for_web 2.1.10 (2.1.12 available)
image_picker_ios 0.8.6+1 (0.8.7+4 available)
image_picker_platform_interface 2.6.2 (2.6.3 available)
intl 0.17.0 (0.18.1 available)
js 0.6.5 (0.6.7 available)
json_path 0.4.1 (0.5.2 available)
json_serializable 6.6.1 (6.7.0 available)
local_auth 2.1.0 (2.1.6 available)
local_auth_android 1.0.6 (1.0.28 available)
local_auth_ios 1.0.7 (1.1.2 available)
local_auth_platform_interface 1.0.4 (1.0.7 available)
local_auth_windows 1.0.1 (1.0.8 available)
lottie 1.2.1 (2.3.2 available)
markdown 5.0.0 (7.1.0 available)
matcher 0.12.13 (0.12.16 available)
material_color_utilities 0.2.0 (0.5.0 available)
meta 1.8.0 (1.9.1 available)
package_info_plus 1.4.3+1 (4.0.0 available)
package_info_plus_linux 1.0.5 (2.0.0 available)
package_info_plus_macos 1.3.0 (2.0.0 available)
package_info_plus_platform_interface 1.0.2 (2.0.1 available)
package_info_plus_web 1.0.6 (2.0.0 available)
package_info_plus_windows 2.1.0 (3.0.0 available)
page_transition 2.0.4 (2.0.9 available)
path 1.8.2 (1.8.3 available)
path_provider_android 2.0.25 (2.0.27 available)
path_provider_foundation 2.2.2 (2.2.3 available)
petitparser 5.1.0 (5.4.0 available)
plugin_platform_interface 2.1.3 (2.1.4 available)
provider 6.0.4 (6.0.5 available)
resource_portable 3.0.1 (3.0.2 available)
sensors_plus 1.4.1 (3.0.0 available)
shared_preferences 2.0.15 (2.1.1 available)
shared_preferences_android 2.1.0 (2.1.4 available)
shared_preferences_ios 2.1.1 (discontinued replaced by shared_preferences_foundation)
smooth_page_indicator 1.0.1 (1.1.0 available)
source_span 1.9.1 (1.10.0 available)
sqflite 2.2.6 (2.2.8+4 available)
swiss_knife 3.1.2 (3.1.5 available)
test_api 0.4.16 (0.6.0 available)
timeago 3.2.2 (3.4.0 available)
universal_io 2.2.0 (2.2.1 available)
url_launcher 6.1.10 (6.1.11 available)
url_launcher_android 6.0.27 (6.0.34 available)
video_player 2.6.0 (2.6.1 available)
video_player_android 2.4.3 (2.4.8 available)
video_player_avfoundation 2.4.2 (2.4.6 available)
video_player_web 2.0.15 (2.0.16 available)
watcher 1.0.2 (1.1.0 available)
webview_flutter 4.0.5 (4.2.0 available)
webview_flutter_android 3.3.1 (3.7.0 available)
webview_flutter_platform_interface 2.0.2 (2.3.0 available)
webview_flutter_wkwebview 3.1.1 (3.4.3 available)
win32 3.1.4 (5.0.2 available)
xml 6.2.2 (6.3.0 available)
Got dependencies!

💪 Building with sound null safety 💪

Running Gradle task 'bundleRelease'...
WARNING: [Processor] Library '/Users/builder/.gradle/caches/modules-2/files-2.1/androidx.media2/media2-session/1.2.0/e110e7db678fbfc107af48fe6110e3cc713f4564/media2-session-1.2.0.aar' contains references to both AndroidX and old support library. This seems like the library is partially migrated. Jetifier will try to rewrite the library anyway.
Example of androidX reference: 'androidx/media2/session/MediaBrowser$Builder'
Example of support library reference: 'android/support/v4/media/session/MediaSessionCompat$Token'

FAILURE: Build failed with an exception.

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

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class kotlin.collections.jdk8.CollectionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.internal.jdk8.JDK8PlatformImplementations found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.random.jdk8.PlatformThreadLocalRandom found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.streams.jdk8.StreamsKt found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$1 found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$2 found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$3 found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.streams.jdk8.StreamsKt$asSequence$$inlined$Sequence$4 found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.text.jdk8.RegexExtensionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)
Duplicate class kotlin.time.jdk8.DurationConversionsJDK8Kt found in modules jetified-kotlin-stdlib-1.8.0 (org.jetbrains.kotlin:kotlin-stdlib:1.8.0) and jetified-kotlin-stdlib-jdk8-1.5.30 (org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.5.30)

 Go to the documentation to learn how to [Fix dependency resolution errors](https://app.flutterflow.io/d.android.com/r/tools/classpath-sync-errors).
  • 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.

BUILD FAILED in 2m 38s
Running Gradle task 'bundleRelease'... 159.2s
Gradle task bundleRelease failed with exit code 1

Build failed :|
Step 7 script Build AAB with Flutter exited with status code 1

@ryanheise
Copy link
Owner

@fuzzball1980 why do you think this is an issue with audio_session? According to your dependencies, it looks like you're not even using this plugin, and the error message doesn't look like it has anything to do with audio_session either.

@fuzzball1980
Copy link

@ryanheise that is strange but I believe i was modifiying the project to remove audio_session and just_audio to check if the error persisted and that is why there are no dependencies (my bad) but seems like gradle keep the library media2-session-1.2.0.aar in the cache and that library is added as a part of audio_session right?

Regarding if that warning is producing the real error on jetifier I dont really know, I will have to check clearing the cache on gradle first.

I will be back asap with the result.

thanks!

@ryanheise
Copy link
Owner

Do you have any results after clearing the cache?

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

3 participants