Error:Circular reference between projects

I am importing a Eclipse Project to Android Studio. But it occur error like below. How do resolve this type of error

Error:Circular reference between projects: :app -> :app 

below is settings.gradle file

include ':app'

here is build.gradle file

apply plugin: 'com.android.application'

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'
    }
}
allprojects {
    repositories {
        jcenter()
    }
}

android {
    buildToolsVersion "23.0.1"
    compileSdkVersion 23
    defaultConfig {
        targetSdkVersion 22
    }
    productFlavors {
    }
    sourceSets {
        main {
            manifest.srcFile 'app/src/main/AndroidManifest.xml'
        }
    }
}
dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
}

Answers


Sol1:same name(:app) will not add in Android Studio.

sol2:if the :app name is not there in your Project, Create new Project and import again, it will work

sol3:in settings.gradle file include ':app',':core' add like this.


Need Your Help

R list parts of a function

r function

I have a large function I use to assign variable types to columns in a data frame.