motion_sensors icon indicating copy to clipboard operation
motion_sensors copied to clipboard

Support Kotlin Gradle plugin version 1.5.20 and higher

Open BenCherif opened this issue 3 years ago • 14 comments

What went wrong: 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 ':motion_sensors' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

BenCherif avatar Oct 11 '22 15:10 BenCherif

Same issue here

alex27riva avatar Nov 14 '22 20:11 alex27riva

same issue

rlmax avatar Jan 29 '23 20:01 rlmax

Any workaround found?

jaykshirsagar05 avatar Feb 27 '23 01:02 jaykshirsagar05

same issue

Nimo11 avatar Mar 02 '23 16:03 Nimo11

#17 this should fix it.

rlmax avatar Mar 02 '23 16:03 rlmax

What I did was the following. Install all the dependencies and once the download is finished, enter the motion sensor library and go directly to the gradle configuration on the Android platform and there I make some changes such as the kotlin version and the minimum version of the SDK and it works correctly for me. I hope this information is of some use to you.

orlandev avatar Mar 23 '23 21:03 orlandev

I figured out this workaround, however, this needs to be done after every time you do flutter clean!

jaykshirsagar05 avatar Mar 23 '23 21:03 jaykshirsagar05

Try using this update:

motion_sensors_updated:
    git:
      url: https://github.com/AnByronV/motion_sensors_updated.git

AnByronV avatar Jun 07 '23 10:06 AnByronV

not working any work around?

anon-marvin avatar Jul 25 '23 14:07 anon-marvin

error From this Plugin file: example/android/build.gradle

ext.kotlin_version = '1.3.50'

jacky610456 avatar Aug 01 '23 05:08 jacky610456

The files below (under "examples" folder) have not been fixed in #17:

  • "example/android/build.gradle" ext.kotlin_version = '1.3.50'

  • "example/android/gradle/wrapper/gradle-wrapper.properties" distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip

Those are still causing errors when building apk. Please, could you take a look and fix it?

gassuncaocosta avatar Aug 11 '23 02:08 gassuncaocosta

What I did was the following. Install all the dependencies and once the download is finished, enter the motion sensor library and go directly to the gradle configuration on the Android platform and there I make some changes such as the kotlin version and the minimum version of the SDK and it works correctly for me. I hope this information is of some use to you.

Thanks, this worked for me. Much appreciated!

Cykelstrom avatar Mar 14 '24 17:03 Cykelstrom

What I did was the following. Install all the dependencies and once the download is finished, enter the motion sensor library and go directly to the gradle configuration on the Android platform and there I make some changes such as the kotlin version and the minimum version of the SDK and it works correctly for me. I hope this information is of some use to you.

In ubuntu this can be done by going into root/.pub-cache/hosted/pub.dev/motion_sensors-0.1.1/android and adding a newer version of kotlin in build.gradle that matches the one in the exact same folder on this github and increasing minimum version of SDK. Works correctly afterwards.

merajhasan88 avatar May 11 '24 16:05 merajhasan88

I'm having same trouble building this using Flutterflow https://community.flutterflow.io/ask-the-community/post/kotlin-gradle-compile-error-ZWJNZLkNX5k7PCW . Also tried downloading code and building using VSC with same error.

Has there been any updates on how to fix this?

darkmoon3d avatar Jun 12 '24 19:06 darkmoon3d