phucgaoxam / line_awesome_icons_flutter

The Line Awesome Icon pack available as Flutter Icons
Other
25 stars 12 forks source link

Gradle error A problem occurred configuring project ':line_awesome_icons'. #1

Closed Panthro closed 5 years ago

Panthro commented 5 years ago

Just ran a

flutter build apk --release

And got the exception:

* Error running Gradle:
ProcessException: Process "..." exited abnormally:

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':line_awesome_icons'.
> Failed to notify project evaluation listener.
   > java.lang.AbstractMethodError (no error message)

* 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: ... app:properties

Please review your Gradle project setup in the android/ folder.

No help on google, can't even understand the issue.

flutter doctor:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.14.2 18C54, locale en-ES)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.2)
[!] Connected device
    ! No devices available

! Doctor found issues in 1 categories.
Panthro commented 5 years ago

I could fix the issue with the following changes:

diff --git a/android/build.gradle b/android/build.gradle
index 830798d..b7faad8 100644
--- a/android/build.gradle
+++ b/android/build.gradle
@@ -1,12 +1,12 @@
 buildscript {
-    ext.kotlin_version = '1.2.30'
+    ext.kotlin_version = '1.2.71'
     repositories {
         google()
         jcenter()
     }

     dependencies {
-        classpath 'com.android.tools.build:gradle:3.1.2'
+        classpath 'com.android.tools.build:gradle:3.2.1'
         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
     }
 }
diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
index 9372d0f..bae5290 100644
--- a/android/gradle/wrapper/gradle-wrapper.properties
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip
Panthro commented 5 years ago

Too fast, now other errors:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:dynamicProfileRuntimeClasspath'.
   > Could not resolve project :line_awesome_icons.
     Required by:
         project :app
      > java.lang.NullPointerException (no error message)

* 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 26s
Panthro commented 5 years ago

I was able to fix with this https://github.com/PonnamKarthik/FlutterToast/issues/18 and this https://github.com/flutter/flutter/issues/22397

phucgaoxam commented 5 years ago

@Panthro I changed compileSdkVersion to 28 in the example's android build gradle and managed to fix problem. Can you please try again with the new version 1.0.4.

phucgaoxam commented 5 years ago

I decided to remove the android and ios plugin's folder because this is just a widget, no need to interact with Gradle or iOS Cocapod. Please try again with 1.0.4+1 😄 Thanks for your feedback

Panthro commented 5 years ago

I can confirm this is no longer an issue, thanks for the support.