Open salum3x opened 2 months ago
I have fixed this build issue in my forked repo Check it: https://github.com/pusher/pusher-channels-flutter/compare/master...AdnanKuZ:pusher-channels-flutter:master https://github.com/AdnanKuZ/pusher-channels-flutter
I need to change in Lib ? pusher? Let me test. Thanks for answer/help!
I can BUILD NOW. BUT STILL HAVE SAME RED info
PS C:\Users\samir\OneDrive\Desktop\Nova pasta (4)\ProjectoCOPMOZ\copmoz> flutter build apk
Warning: SDK processing. This version only understands SDK XML versions up to 3 but an SDK XML file of version 4 was encountered. This can happen if you use versions of Android Studio and the command-line tools that were released at different times. e: C:/Users/samir/OneDrive/Desktop/Nova pasta (4)/ProjectoCOPMOZ/copmoz/build/device_info_plus/.transforms/2aa35394328ea228c97e88131ce8de47/transformed/out/jars/classes.jar!/META-INF/device_info_plus_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: C:/Users/samir/OneDrive/Desktop/Nova pasta (4)/ProjectoCOPMOZ/copmoz/build/file_saver/.transforms/330549d858e9fdb2f7ce460ee3b46d9c/transformed/out/jars/classes.jar!/META-INF/file_saver_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: C:/Users/samir/OneDrive/Desktop/Nova pasta (4)/ProjectoCOPMOZ/copmoz/build/pusher_channels_flutter/.transforms/9b4a7e9d66c534622ea66ecffb607591/transformed/out/jars/classes.jar!/META-INF/pusher_channels_flutter_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: C:/Users/samir/OneDrive/Desktop/Nova pasta (4)/ProjectoCOPMOZ/copmoz/build/shared_preferences_android/.transforms/ea678782f3590a8abfb67e009ebfc949/transformed/out/jars/classes.jar!/META-INF/shared_preferences_android_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: C:/Users/samir/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.23/dbaadea1f5e68f790d242a91a38355a83ec38747/kotlin-stdlib-1.9.23.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: C:/Users/samir/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.23/dbaadea1f5e68f790d242a91a38355a83ec38747/kotlin-stdlib-1.9.23.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: C:/Users/samir/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.23/dbaadea1f5e68f790d242a91a38355a83ec38747/kotlin-stdlib-1.9.23.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. Running Gradle task 'assembleRelease'... 105,4s √ Built build\app\outputs\flutter-apk\app-release.apk (82.1MB) PS C:\Users\samir\OneDrive\Desktop\Nova pasta (4)\ProjectoCOPMOZ\copmoz>
log] Current User: {id: 73796c44-4994-4ae6-b93e-69cb5802c0a2, name: Salum Said, email: salum@ifix.co.mz, phone_number: 869285587, avatar: https://siga.copmoz.ac.mz/avatars/avatars/FsPyFzvaUAEHyPR.jpg} D/TrafficStats( 8884): tagSocket(188) with statsTag=0xffffffff, statsUid=-1 [log] Connection: CONNECTING D/EGL_emulation( 8884): app_time_stats: avg=164.68ms min=5.06ms max=895.31ms count=6 [log] Connection: CONNECTED [log] User ID: contact-user D/EGL_emulation( 8884): app_time_stats: avg=18.84ms min=7.40ms max=36.42ms count=42 [log] Response data is: {auth: 0e7dd9739e1891d8ffe4:a6bb595cbdf5f632eaf8b7e4b7ed696569b43ed0e48843ddac4989cc86ce667d, channel_data: {"user_id":"73796c44-4994-4ae6-b93e-69cb5802c0a2","user_info":{"name":"Salum Said"}}} W/User ( 8884): Invalid key in subscription auth data: '0e7dd9739e1891d8ffe4' [log] onError: Invalid key in subscription auth data: '0e7dd9739e1891d8ffe4' code: null exception: null
Try upgrading your flutter project's gradle and kotlin version: First migrate to the new way of applying the Flutter's Gradle plugins, use this link for reference: https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply Then update the kotlin version to at least 1.8.22 Also use a newer JavaVersion.VERSION_11
I am having the same issue and the solutions aren't working.
I am having the same issue and the solutions aren't working.
same :(
Already fix yeeyyyy
I setup the above method in my project android/build.gradle and also in .pub-cache/hosted/pub.dev/pusher_channels_flutter-2.2.1/android/build.gradle.
Go to /Users/YOUR_NAME/.pub-cache/hosted/pub.dev/pusher_channels_flutter-2.2.1/android/build.gradle. In the build.gradle upgrade compileSdkVersion to 34
To use the pusher_channels_flutter
package in your Flutter project, you can add it directly from the GitHub repository.
Add the following to your pubspec.yaml
under dependencies
:
dependencies:
flutter:
sdk: flutter
pusher_channels_flutter:
git:
url: https://github.com/ArmanKT/pusher-channels-flutter.git
ref: master
or
dependency_overrides:
pusher_channels_flutter:
git:
url: https://github.com/ArmanKT/pusher-channels-flutter.git
ref: master
Go to /Users/YOUR_NAME/.pub-cache/hosted/pub.dev/pusher_channels_flutter-2.2.1/android/build.gradle. In the build.gradle upgrade compileSdkVersion to 34
This solved it for ME
PS C:\Users\samir\OneDrive\Desktop\Nova pasta (4)\ProjectoCOPMOZ\copmoz> flutter build apk
Font asset "MaterialIcons-Regular.otf" was tree-shaken, reducing it from 1645184 to 4320 bytes (99.7% reduction). Tree-shaking can be disabled by providing the --no-tree-shake-icons flag when building your app. e: C:/Users/samir/OneDrive/Desktop/Nova pasta (4)/ProjectoCOPMOZ/copmoz/build/device_info_plus/.transforms/2aa35394328ea228c97e88131ce8de47/transformed/out/jars/classes.jar!/META-INF/device_info_plus_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: C:/Users/samir/OneDrive/Desktop/Nova pasta (4)/ProjectoCOPMOZ/copmoz/build/file_saver/.transforms/330549d858e9fdb2f7ce460ee3b46d9c/transformed/out/jars/classes.jar!/META-INF/file_saver_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: C:/Users/samir/OneDrive/Desktop/Nova pasta (4)/ProjectoCOPMOZ/copmoz/build/pusher_channels_flutter/.transforms/9b4a7e9d66c534622ea66ecffb607591/transformed/out/jars/classes.jar!/META-INF/pusher_channels_flutter_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: C:/Users/samir/OneDrive/Desktop/Nova pasta (4)/ProjectoCOPMOZ/copmoz/build/shared_preferences_android/.transforms/ea678782f3590a8abfb67e009ebfc949/transformed/out/jars/classes.jar!/META-INF/shared_preferences_android_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: C:/Users/samir/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.23/dbaadea1f5e68f790d242a91a38355a83ec38747/kotlin-stdlib-1.9.23.jar!/META-INF/kotlin-stdlib.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: C:/Users/samir/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.23/dbaadea1f5e68f790d242a91a38355a83ec38747/kotlin-stdlib-1.9.23.jar!/META-INF/kotlin-stdlib-jdk8.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1. e: C:/Users/samir/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.9.23/dbaadea1f5e68f790d242a91a38355a83ec38747/kotlin-stdlib-1.9.23.jar!/META-INF/kotlin-stdlib-jdk7.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.9.0, expected version is 1.7.1.
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':pusher_channels_flutter:verifyReleaseResources'.
Try:
Get more help at https://help.gradle.org
BUILD FAILED in 37s Running Gradle task 'assembleRelease'... 37,9s
┌─ Flutter Fix ──────────────────────────────────────────────────────────────────────────────────────────┐ │ [!] Your project requires a newer version of the Kotlin Gradle plugin. │ │ Find the latest version on https://kotlinlang.org/docs/releases.html#release-details, then update the │ │ version number of the plugin with id "org.jetbrains.kotlin.android" in the plugins block of │ │ C:\Users\samir\OneDrive\Desktop\Nova pasta (4)\ProjectoCOPMOZ\copmoz\android\settings.gradle. │ │ │ │ Alternatively (if your project was created before Flutter 3.19), update │ │ C:\Users\samir\OneDrive\Desktop\Nova pasta (4)\ProjectoCOPMOZ\copmoz\android\build.gradle │ │ ext.kotlin_version = '' │
└────────────────────────────────────────────────────────────────────────────────────────────────────────┘
Gradle task assembleRelease failed with exit code 1