Configuration named "default" not found when importing from Git

I am working on a project that first started in Eclipse. Then I went to Android Studio.

I work on a Mac and everything is fine. But then when I try to download my Git Rep on my PC I get this message:

Configuration with name 'default' not found

      

Here is my project organization:

SP-Mobile
  progressWheel ( Lib as a project )
  sPMobile ( Main Project )
    build.gradle (1) 
  build.gradle (top)
  settings.gradle (top)

      

build.gradle (1)

apply plugin: 'com.android.application'

android {
compileSdkVersion 'Google Inc.:Google APIs:21'
buildToolsVersion "21.1.2"
lintOptions {
    abortOnError false
}

defaultConfig {
    applicationId "com.spmkt.mobile"
    minSdkVersion 16
    targetSdkVersion 22
}

buildTypes {
    release {
        minifyEnabled true
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
packagingOptions {
    exclude 'META-INF/DEPENDENCIES.txt'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/notice.txt'
    exclude 'META-INF/license.txt'
    exclude 'META-INF/dependencies.txt'
    exclude 'META-INF/LGPL2.1'
}
}

dependencies {
compile project(':progressWheel')
compile 'com.google.code.gson:gson:2.3'
compile 'com.google.android.gms:play-services:+'
compile 'com.android.support:appcompat-v7:22.2.0'
compile files('libs/crashlytics.jar')
compile files('libs/httpcore-4.3.2.jar')
compile files('libs/httpmime-4.3.3.jar')

      

}

build.gradle (top)

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:1.2.3'
}
}

allprojects {
repositories {
    jcenter()
}
}

      

And finally settings.gradle

include ':progressWheel'
include ':sPMobile'

      

I did some tests and when I remove the dependencies to progressWheel I have no more problems (the code no longer compiles, but synchronization is done)

I think my problem comes from this line:

compile project(':progressWheel')

      

But I can't figure out why on one computer everything is fine. and in the other it fails!

EDIT: It seems that progressWheel is being added as a module, but sPMobile no.

progressWheel has .iml inside, but sPMobile doesn't.

EDIT 2:

I seem to have SP-Mobile.iml in red, I don't know what that means, but my iml lib is not red, so I could understand the difference between .iml mac and pc ...

Here is my .iml project

<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.id="SP-Mobile" 
external.linked.project.path="$MODULE_DIR$" 
external.root.project.path="$MODULE_DIR$" external.system.id="GRADLE" 
external.system.module.group="" external.system.module.version="unspecified" 
type="JAVA_MODULE" version="4">

      

                                                          

Any help would be appreciated!

+3


source to share


1 answer


The error indicates that one or more of your library paths are wrong, so make sure your libraries exist in the default path, or you can delete and reinsert them from the GUI option. Right click on the project: Open Module settings >> select app module >> dependencies >> Add from "+" icon and select module dependency

...



0


source







All Articles