chinloyal / pusher_client

A Pusher Channels Client for Fluttter (Fully supports Android and iOS)
https://pusher.com/channels
MIT License
43 stars 178 forks source link

Android: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher / IOS: Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation) #79

Open IbrahimHasan93 opened 1 week ago

IbrahimHasan93 commented 1 week ago

In my flutter app am using pusher_client and when i upgraded kotlin version of the whole project i got this: The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher. The following dependencies do not satisfy the required version: project ':pusher_client' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

my settings.gradle file looks like this: pluginManagement { def flutterSdkPath = { def properties = new Properties() file("local.properties").withInputStream { properties.load(it) } def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath } settings.ext.flutterSdkPath = flutterSdkPath()

includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")

repositories {
    google()
    mavenCentral()
    gradlePluginPortal()
}

}

plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" id "com.android.application" version "7.3.0" apply false id "org.jetbrains.kotlin.android" version "1.9.20" apply false id 'com.google.gms.google-services' version '4.4.2' apply false }

include ":app"

in pubspec.yaml: environment: sdk: '>=3.2.6 <4.0.0'

in android/app/build.gradle: compileSdkVersion 34 minSdkVersion 28 targetSdkVersion 34 signingConfig signingConfigs.debug and in the dependencies: dependencies { implementation 'com.android.support:multidex:2.0.1' implementation platform('com.google.firebase:firebase-bom:32.1.1') coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5' implementation 'androidx.window:window:1.0.0' implementation 'androidx.window:window-java:1.0.0' }

as For IOS : Error (Xcode): Building for 'iOS-simulator', but linking in object file (/../Documents/flutterApps/app/ios/Pods/Sodium/Sodium/libsodium/libsodium-ios.a[arm64]3) built for 'iOS'

Error (Xcode): Linker command failed with exit code 1 (use -v to see invocation)

Could not build the application for the simulator. Error launching application on iPhone 11 pro max.

Can anyone help please?

sabbir420 commented 1 day ago

@IbrahimHasan93, I am facing the same issue. Have you managed to solve it yet? @chinloyal, please solve the problem as soon as possible. My project depends on this plugin.