e袋洗 build.gradle

apply plugin: ‘com.android.application‘

android {
    compileSdkVersion 22
    buildToolsVersion ‘22.0.0‘

    defaultConfig {
        applicationId "com.edaixi.activity"
        minSdkVersion 9
        targetSdkVersion 22
        versionCode 15
        versionName "3.5"

        // dex突破65535的限制
        multiDexEnabled true
        //manifestPlaceholders = [UMENG_CHANNEL_VALUE: "default_channel"]
    }

//    productFlavors {
//        default_channel {}
//        wandoujia {}
//        xiaomi {}
//        baidu {}
//        huawei {}
//    }
//    productFlavors.all { flavor ->
//        flavor.manifestPlaceholders = [UMENG_CHANNEL_VALUE: name]
//    }

    signingConfigs {
        debug {
            // No debug config
        }

        release {
            storeFile file("/工作文件/AndroidStudioKey/edaixisign")
            storePassword "edaixi.com"
            keyAlias "edaixi"
            keyPassword "edaixi.com"
        }

    }

    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile(‘proguard-android.txt‘), ‘proguard-rules.pro‘
            // 移除无用的resource文件
            shrinkResources true
        }
    }

    sourceSets {
        main {
            java.srcDirs = [‘src/main/java‘, ‘src/main/java-gen‘]
            jniLibs.srcDirs = [‘libs‘]
        }
    }

    packagingOptions {
        exclude ‘META-INF/DEPENDENCIES‘
        exclude ‘META-INF/NOTICE‘
        exclude ‘META-INF/LICENSE‘
        exclude ‘META-INF/LICENSE.txt‘
        exclude ‘META-INF/NOTICE.txt‘
    }
}

dependencies {
    compile fileTree(include: [‘*.jar‘], dir: ‘libs‘)
    compile files(‘libs/fastjson-1.2.6.jar‘)
    compile files(‘libs/umeng-update-v2.6.0.1.jar‘)
    compile files(‘libs/mta-sdk-1.6.2.jar‘)
    compile files(‘libs/libammsdk.jar‘)
    compile files(‘libs/Cashier_SDK-v4.2.0.jar‘)
    compile ‘com.loopj.android:android-async-http:1.4.8‘
    compile ‘com.jakewharton:butterknife:7.0.1‘
    compile ‘com.android.support:support-v4:22.2.1‘
    compile ‘com.android.support:recyclerview-v7:22.2.1‘
    compile ‘de.greenrobot:greendao:1.3.7‘
    compile ‘com.android.support:appcompat-v7:22.2.1‘
    compile files(‘libs/MagicWindowSDK.jar‘)
    compile files(‘libs/locSDK_5.2.jar‘)
    compile files(‘libs/baidumapapi_v3_5_0.jar‘)
    compile files(‘libs/eventbus-2.4.0.jar‘)
    compile files(‘libs/alipaysdk.jar‘)
    compile files(‘libs/TalkingDataAnalytics_V1.2.79.jar‘)
    compile files(‘libs/umeng-analytics-v5.5.3.jar‘)
    compile files(‘libs/du.jar‘)
    compile files(‘libs/avoscloud-v2.6.9.1.jar‘)
    compile "com.networkbench.newlens.agent.android:nbs.newlens.agent:2.2.6"
}

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath fileTree(dir: ‘/工作文件/听云依赖‘, include: [‘*.jar‘])
        //在buildscript添加这行,地址换成自己的. 听云sdk的编译插件,不会嵌入在apk中.
    }
}
repositories {
    mavenCentral()
}
apply plugin: ‘android‘
apply plugin: ‘newlens‘

  

时间: 2024-08-09 02:08:22

e袋洗 build.gradle的相关文章

com.android.tools.build:gradle:X.XX.XX:gradle.jar

在使用Android Studio 这个IDE时,出现com.android.tools.build:gradle:X.XX.XX:gradle.jar 插件无法下载问题 可能的原因就是网速不好或者依赖仓库的下载网址被墙了,可以配置代理试试.比如,android studio 定义的默人依赖仓库为jcenter()仓库.如下 打开项目下的 build.gradle文件,不是Module下 allprojects { repositories { jcenter() } } 网上搜索到一些方法如下

Error:Could not find com.android.tools.build:gradle:2.14.1.

你只要一步把Android Plugin Version改为最新的:2.2.0-beta3(这是目前最新的).直接在Project Structru->Project->Android Plugin Version 中改了就好! 查看最新的Android Plugin Version:https://jcenter.bintray.com/com/android/tools/build/gradle/ 查看最新的Gradle:Gradle Distributions.

Android(java)学习笔记127:Android Studio新建工程中的build.gradle、settings.gradle

随着信息化的快速发展,IT项目变得越来越复杂,通常都是由多个子系统共同协作完成.对于这种多系统.多项目的情况,很多构建工具都已经提供了不错的支持,像maven.ant.Gradle除了借鉴了ant或者maven的继承的方式定义子项目,也提供了一种更为方便的集中配置的方式,大大减少了构建带来的复杂度.除此之外,Gradle还提供了清晰的Project树模型来映射多项目的组织结构.下面,让我们了解一下如何使用Gradle构建多项目. 1.多项目的定义和结构 Mulit project 设置是grad

AndroidStudio build.gradle 报错

Android Studio. I'm getting this kind of error during application run. Error:Execution failed for task ':app:packageDebug'. Duplicate files copied in APK META-INF/notice.txt build.gradle apply plugin: 'android' android { compileSdkVersion 19 buildToo

Android(java)学习笔记126:Android Studio中build.gradle简介

1.首先我们直接上代码介绍: // Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript { repositories { //这里可以看到是指明的jcenter(), 之前版本则是mavenCentral() // jcenter可以理解成是一个新的中央远程仓库,兼容maven中心仓库,而且性能更优. jcenter() } dep

用Gradle构建时,将密码等敏感信息放在build.gradle之外

密码 在做版本release时你app的 build.gradle你需要定义 signingConfigs.此时你应该避免以下内容: 不要做这个 . 这会出现在版本控制中. signingConfigs { release { storeFile file("myapp.keystore") storePassword "password123" keyAlias "thekey" keyPassword "password789&qu

安卓两个build.gradle的区别

作为安卓入门选手,在导入第三方的时候才发现居然有两个build.gradle,我说咋不对啊,原来是导错了(可能是因为我没有看安卓培训的视频吧). 那么就说一下这两个的作用(一个Project的,一个Module的): 简单一点来说Project中的gradle是声明的资源包括依赖项.第三方插件.maven仓库地址的,是用来加载gradle脚本自身需要使用的资源,而Module中的gradle是添加的使应用程序所需要的依赖包,也就是项目运行所需要的东西.

Android Studio 中build.gradle文件的详细解析

困惑的build.gradle 在由Eclipse转到Android Studio之后,第一个让我感到困惑的是build.gradle这个文件了,实在话,当时我并不知道这么写是几个意思. apply plugin: 'com.android.application' android { compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig { applicationId "com.example.test&

Android build.gradle 配置

一.初始配置:(新建项目自动配置好的): 1.build.gradle(app) apply plugin: 'com.android.application' //下边apk重命名使用 static def buildTime() { def date = new Date() def formattedDate = date.format('yyyyMMdd-HHmm') def iml = new File('app/app.iml') if (iml.exists()) { return