- Forum posts: 1
Oct 3, 2018, 1:24:56 AM via Website
Oct 3, 2018 1:24:56 AM via Website
Hi, apologies if this is in the wrong area.
I am learning to become a Android Developer and I am getting the following error after importing a DemoApp lecture/project.
Error22, 0) Could not find method android() for arguments [build_37t24irnbyoe7akecva1y2tmh$_run_closure3@4e763413] on root project 'DemoApp' of type org.gradle.api.Project.
I am not sure what to do here, or what is causing this. From what I understand it's something to do with the build or project version?
As I understand it, it is something to do with my Gradle Script or the Build Script, but I dont understand what is wrong.
I did some initial research, and found an StackOverFlow article but I can't post the link as I am a new user. But the answer said
You are using the wrong build.gradle file.
In your top-level file you can't define an android block.
Just move this part inside the module/build.gradle file
But I dont understand where you move it to.
Or how I need to fix this.
Can someone please explain what the problem is?
I am using Android Studio 2.2.1
Recommended editorial content
With your consent, external content is loaded here.
By clicking on the button above, you agree that external content may be displayed to you. Personal data may be transmitted to third-party providers in the process. You can find more information about this in our Privacy Policy.