我正在开始一个Eclipse项目。然后我在Android Studio中迁移。从Git导入时找不到名称为'default'的配置
我在Mac上工作,一切正常。 但是,当我尝试下载我的Git的声誉在我的电脑,我得到这个消息:
Configuration with name 'default' not found
这里是我的项目单位:
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-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()
}
}
最后settings.gradle
include ':progressWheel'
include ':sPMobile'
我做了一些测试,当我删除依赖于progressWheel,我没有更多的问题(代码不能编译了,但同步成功)
我想我的问题来自这行:
compile project(':progressWheel')
但我不明白,为什么一台电脑上一切正常。而在另一个它失败!
编辑: 看来,progressWheel像模块一样添加,但sPMobile没有。
progressWheel里面有一个.iml,但sPMobile没有。
编辑2:
看来我有我的SP-Mobile.iml红色,我不知道这意味着什么,但我IML的lib不红,所以我能理解.iml MAC之间的性差异和PC ...
这里是我的.iml项目
<?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">
任何帮助将不胜感激!
我也看到了这种情况,但我忽略了这个信息。 在我使用Android Studio之前,我等待完成所有初始化(同步+构建)。 – Hogun