albertalrisa / share_api

Flutter Share API. Flutter Plugin for sharing contents to social media.
MIT License
18 stars 21 forks source link

Gradle Kotlin Competability #13

Open barak-innov opened 4 years ago

barak-innov commented 4 years ago

I try to compile and run with the default "hello_world" app of Flutter, but with this library imported.

I got the next error while compiling:

* Error running Gradle:
ProcessException: Process "/home/<username>/Desktop/Projects/FutterApps/hello_world/android/gradlew" exited abnormally:

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.2.51 and higher. Project 'share_api' is using version 1.2.30.

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

* Get more help at https://help.gradle.org

BUILD FAILED in 0s
  Command: /home/<username>/Desktop/Projects/FutterApps/hello_world/android/gradlew app:properties
Please review your Gradle project setup in the android/ folder.
Exited (sigterm)

Hope you can help me!

barak-innov commented 4 years ago

I try to compile and run with the default "hello_world" app of Flutter, but with this library imported.

I got the next error while compiling:

* Error running Gradle:
ProcessException: Process "/home/<username>/Desktop/Projects/FutterApps/hello_world/android/gradlew" exited abnormally:

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.2.51 and higher. Project 'share_api' is using version 1.2.30.

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

* Get more help at https://help.gradle.org

BUILD FAILED in 0s
  Command: /home/<username>/Desktop/Projects/FutterApps/hello_world/android/gradlew app:properties
Please review your Gradle project setup in the android/ folder.
Exited (sigterm)

Hope you can help me!

You can try to use this reference to solve it: https://discuss.kotlinlang.org/t/kotlin-gradle-plugin-1-2-51/9562

PanikPlunder commented 4 years ago

Open the android file in the share plugin package on your pc and apply following changes to build.gradle

ext.kotlin_version = '1.3.50'

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"