标签:androi cdir url srcdir hub 下载 files enter err
// 声明是Android程序 apply plugin: ‘com.android.application‘ android { signingConfigs { } compileSdkVersion 21 buildToolsVersion ‘25.0.0‘ sourceSets { main { manifest.srcFile ‘AndroidManifest.xml‘ java.srcDirs = [‘src‘] resources.srcDirs = [‘src‘] aidl.srcDirs = [‘src‘] renderscript.srcDirs = [‘src‘] res.srcDirs = [‘res‘] assets.srcDirs = [‘assets‘] } // Move the tests to tests/java, tests/res, etc... instrumentTest.setRoot(‘tests‘) debug.setRoot(‘build-types/debug‘) release.setRoot(‘build-types/release‘) } defaultConfig { applicationId "com.wbh.hoge.crmapp" minSdkVersion 21 targetSdkVersion 21 versionCode 1 versionName "1.0" manifestPlaceholders = [UMENG_CHANNEL_VALUE: "channel_name"] } //移除lint检查的error lintOptions { abortOnError false } buildTypes { release { // 是否进行混淆 minifyEnabled false // 混淆文件的位置 proguardFiles getDefaultProguardFile(‘proguard-android.txt‘), ‘proguard-rules.pro‘ } } productFlavors.all { flavor -> flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name] } compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 } } dependencies { // compile ‘com.umeng:fb:5.4.0‘ compile ‘com.android.support:support-v4:21.+‘ compile fileTree(include: ‘*.jar‘, dir: ‘libs‘) compile ‘com.jiechic.library:xUtils:2.6.14‘ //compile files(‘libs/wbh-adapter-0.0.1-SNAPSHOT.jar‘) compile files(‘libs/universal-image-loader-1.9.5.jar‘) } repositories { jcenter() maven { url "https://raw.githubusercontent.com/umeng/mvn-repo-umeng/master/repository" } }
这是无错的一个配置,真是费劲,好几天了,都不行,终于可以了;
gradle 这个插件,将从网上下载的文件,放到对应的文件夹下了:
/Applications/Android Studio.app/Contents/gradle/gradle-3.3
原本该路径中是没有gradle-3.3,硬加上的。不知道怎么设置全局的,否则建立个新项目就卡住不动了。
标签:androi cdir url srcdir hub 下载 files enter err
原文地址:http://www.cnblogs.com/hoge/p/7599684.html