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

Failed to BUILD in last version 2024 Flutter #166

Open
salum3x opened this issue Aug 21, 2024 · 11 comments
Open

Failed to BUILD in last version 2024 Flutter #166

salum3x opened this issue Aug 21, 2024 · 11 comments

Comments

@salum3x
Copy link

salum3x commented Aug 21, 2024

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'.

A failure occurred while executing com.android.build.gradle.tasks.VerifyLibraryResourcesTask$Action
Android resource linking failed
ERROR:C:\Users\samir\OneDrive\Desktop\Nova pasta (4)\ProjectoCOPMOZ\copmoz\build\pusher_channels_flutter\intermediates\merged_res\release\values\values.xml:194: AAPT: error: resource android:attr/lStar not found.

  • 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 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

@AdnanKuZ
Copy link

I have fixed this build issue in my forked repo
Check it:
master...AdnanKuZ:pusher-channels-flutter:master
https://github.com/AdnanKuZ/pusher-channels-flutter

@salum3x
Copy link
Author

salum3x commented Aug 21, 2024

I need to change in Lib ? pusher? Let me test. Thanks for answer/help!

@salum3x
Copy link
Author

salum3x commented Aug 21, 2024

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>

@salum3x
Copy link
Author

salum3x commented Aug 21, 2024

log] Current User: {id: 73796c44-4994-4ae6-b93e-69cb5802c0a2, name: Salum Said, email: [email protected], 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

@AdnanKuZ
Copy link

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

@Rahat-Iqbal-git
Copy link

I am having the same issue and the solutions aren't working.

@cookkiees
Copy link

I am having the same issue and the solutions aren't working.

same :(

@cookkiees
Copy link

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.

@Hassan6197
Copy link

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

@jim-2000
Copy link

jim-2000 commented Sep 30, 2024

Using pusher_channels_flutter from GitHub

To use the pusher_channels_flutter package in your Flutter project, you can add it directly from the GitHub repository.

Option 1: Regular Dependency

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

@Joezzy
Copy link

Joezzy commented Oct 16, 2024

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

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

7 participants