Import the project obtained from GitHub or the third party demo into Android studio and report an error. Plug in with ID ‘com. Android. Application’ not found; Today, I imported a demo of iFLYTEK to see the directory of the project is obviously wrong. I feel that there is a build. Gradle missing; Build. Gradle with only module and build. Gradle without project
The normal thing is this:
So Baidu circle, give the solution
1. Find a project that can be compiled normally or create a new project. Copy the code in build. Gradle in project, as shown in the figure below
2. Paste it into the build. Gradle of the error reporting project and put it at the bottom. The code below is as follows
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
Paste position:
Once compiled, it will pass; Generally, the reason for this problem is that someone else threw the module directly