There is a project on GitHub'e - a project and I need to connect it to my project.
Going the way described in some response to stackoverflow, I tried to connect the project like this:
File -> New -> Import Module -> Chose the folder with the source code of the project. To this, AS told me:
Select modules to import
In the imported project, build.gradle contains the line: apply plugin: "android-library"
Why doesn't Android Studio see the project as a module and how to connect it?
build.gradle (global) of my project:
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:2.1.3' } } allprojects { repositories { jcenter() } } task clean(type: Delete) { delete rootProject.buildDir } build.gradle (local) of my project:
apply plugin: 'com.android.application' android { compileSdkVersion 24 buildToolsVersion "24.0.3" defaultConfig { applicationId "com.rostislav.dugin.playdotaformoney" minSdkVersion 17 targetSdkVersion 24 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:24.2.1' } build.gradle imported project (manually edited via notepad, so errors are not excluded):
task wrapper(type: Wrapper) { gradleVersion = "1.8" } apply plugin: "com.android.library" buildscript { repositories { mavenCentral() } dependencies { // Android Gradle plugin. classpath 'com.android.tools.build:gradle:2.1.3' } } android { compileSdkVersion 24 buildToolsVersion "24.0.3" defaultConfig { minSdkVersion 17 targetSdkVersion 24 versionCode = "1" versionName = "0.1" } sourceSets { main { manifest.srcFile "AndroidManifest.xml" java.srcDirs = ["src"] res.srcDirs = ["res"] } } } repositories { mavenCentral() } dependencies { // Libs: // Android API lvl 8 compile group: "com.google.android", name: "android", version: "2.2.1" // GSON compile group: "com.google.code.gson", name: "gson", version: "2.2.2" } Module import screen:

Select modules to import. Yes, I did. But apparently, manual editing is not a good idea. Now I’ll open my AS and use the editor to change everything. - user189127