Showing posts with label gradle. Show all posts
Showing posts with label gradle. Show all posts

Thursday, August 25, 2016

How to solve "method not found: 'android()'" on Android Studio?

There are two common errors when you import a proyect in Android Studio like these two:
  • "Gradle DSL method not found: 'android()'" //appears on Gradle 2.x
  •  "Could not find method android() for arguments" //appers on Gradle 3.x
1. It can be solved modifying two build.gradle files, first gradle file at parent should be look like:
2. And the second gradle file inside app folder should have android declaration:
This error occurs when you have android declaration inside gradle parent file.

Best Regards,