yasukotelin / ext_storage

ext_storage is minimal flutter plugin that provides external storage path and external public storage path.
MIT License
29 stars 61 forks source link

Build failed due to gradle issues in plugin #9

Open vaishnavmhetre opened 3 years ago

vaishnavmhetre commented 3 years ago

Howdy mate!

I just touched down into your repo and wanted to use the plugin for getting Storage paths. Although unfortunately I ran into build error at gradle stage. Attached is the stacktrace from Flutter.

Launching lib\main.dart on Android SDK built for x86 in debug mode...
 lib\main.dart

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* Where:
Build file 'C:\Users\mhetr\AppData\Local\Pub\Cache\hosted\pub.dartlang.org\ext_storage-1.0.3\android\build.gradle' line: 25

* What went wrong:
A problem occurred evaluating project ':ext_storage'.
> Could not initialize class org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSetKt

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

2: Task failed with an exception.
-----------
* Where:
Script 'C:\Users\mhetr\src\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 326

* What went wrong:
A problem occurred configuring project ':ext_storage'.
> Failed to notify project evaluation listener.
   > Could not initialize class org.jetbrains.kotlin.gradle.plugin.sources.DefaultKotlinSourceSetKt
   > compileSdkVersion is not specified. Please add it to build.gradle

* 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 5s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

I have no good idea of why this happened - being new at Flutter, but maybe you could help fix if plugin issue or give some resolution if an error from my side.

I've added ext_storage: ^1.0.3 to my project, did a flutter get and ran a debug session.

HetalGohil commented 3 years ago

i am also getting same error ...can you help?

Aperico-com commented 3 years ago

Same exact error here too.

chitgoks commented 3 years ago

Any update or response?

pmaAdvensyn commented 3 years ago

I solved that with a downgrade gradle app. android/build.gradle file : I downgrade 'com.android.tools.build:gradle:4.1.0' ==> 'com.android.tools.build:gradle:3.5.2'

Yuiry-IV commented 3 years ago

Same issue reproducible for me:

image

once10301 commented 3 years ago

External Libraries->Flutter Plugins->ext_storage-1.0.3->android->build.gradle

ext.kotlin_version = '1.3.10'->ext.kotlin_version = '1.4.20'