热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Android同步时出错,androidAndroidStudio1.1.0Gradle项目同步失败在OSX上导入Gradle项目时出错堆栈内存溢出...

我刚在这个文件夹中安装了gradle:UsersjoanetDevelopmentgradle-2.3编辑launchd.conf文件sudovimetclaunch

我刚在这个文件夹中安装了gradle:/Users/joanet/Development/gradle-2.3

编辑launchd.conf文件

sudo vim /etc/launchd.conf

设置变量GRAILS_HOME

setenv GRAILS_HOME /Users/joanet/Development/gradle-2.3

使用文件 - >导入项目

但我收到此错误: Gradle项目同步失败 , 错误:在Android Studio中找不到名称为“default”的配置

60ebd688414b29affb9f5f2df6e31c1c.png

这里是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.1.0'

// NOTE: Do not place your application dependencies here; they belong

// in the individual module build.gradle files

}

}

allprojects {

repositories {

jcenter()

}

}

和/app/build.gradle:

apply plugin: 'com.android.application'

android {

compileSdkVersion 22

buildToolsVersion '22.0.0'

defaultConfig {

applicationId "no.nordicsemi.android.nrftoolbox"

minSdkVersion 18

targetSdkVersion 22

versionCode 30

versionName "1.12.1"

}

buildTypes {

release {

minifyEnabled false

proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'

}

}

}

dependencies {

compile fileTree(dir: 'libs', include: ['*.jar'])

compile 'com.android.support:appcompat-v7:22.0.0'

compile project(':..:DFULibrary:dfu')

compile files('libs/achartengine-1.1.0.jar')

compile files('libs/nrf-logger-v2.0.jar')

}

这里是settings.gradle:

include ':app', '..:DFULibrary:dfu'

这里是gradle-wrapper.properties:

#Wed Apr 10 15:27:10 PDT 2013

distributionBase=GRADLE_USER_HOME

distributionPath=wrapper/dists

zipStoreBase=GRADLE_USER_HOME

zipStorePath=wrapper/dists

distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip

// 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.1.0'

// NOTE: Do not place your application dependencies here; they belong

// in the individual module build.gradle files

}

}

allprojects {

repositories {

jcenter()

}

}



推荐阅读
author-avatar
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有