October 8, 2017

Fix Gradle DSL method not found: 'compile()' Android Studio


I was compiling an app and got this error. There is an easy fix to this type of error - Gradle DSL method not found: 'compile()' in Android Studio.

The dependencies load in one line like;

compile 'com.jaredrummler:android-processes:+' compile 'com.github.mjdev:libaums:+' compile 'org.apache.ftpserver:ftpserver-core:+' compile 'commons-net:commons-net:

The solutions to make them ordered one after another.

 compile "com.android.support:appcompat-v7:${supportLibVersion}"
 compile "com.android.support:cardview-v7:${supportLibVersion}"
 compile "com.android.support:design:${supportLibVersion}"

Fix compile error in android studio
Select Build APK and you can see the error is gone.

Kindly spend 5 seconds to share this post

Search Here

Whats Hot

About Author