参考链接

参考内容如下:
AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?><manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.myapplication" >    <application  android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" >        <activity  android:name=".MyActivity" android:label="${label}" >            <intent-filter>                <action android:name="android.intent.action.MAIN" />                <category android:name="android.intent.category.LAUNCHER" />            </intent-filter>        </activity>         <meta-data  android:name="com.google.android.maps.v2.API_KEY" android:value="${mapKey}" />    </application></manifest>

build.gradle

apply plugin: 'com.android.application'android {    compileSdkVersion 20    buildToolsVersion "20.0.0"    defaultConfig {        applicationId "com.myapplication"        minSdkVersion 15        targetSdkVersion 20        versionCode 1        versionName "1.0"        manifestPlaceholders = [label: "defaultName"]        manifestPlaceholders = [mapKey: "your_debug_key"]    }    buildTypes {        release {            runProguard false            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'            manifestPlaceholders = [mapKey: "your_release_key"]        }    }    productFlavors {        flavor1 {            manifestPlaceholders = [label: "flavor1"]        }        flavor2 {            manifestPlaceholders = [label: "flavor2"]        }        flavor3 {            manifestPlaceholders = [label: "flavor3"]        }    }}dependencies {    compile fileTree(dir: 'libs', include: ['*.jar'])}

更多相关文章

  1. android 监听edittext addTextChangedListene
  2. android 获取手机电话号码和短信内容
  3. android链接rest services
  4. java.security.NoSuchProviderException: no such provider: BC
  5. Ubuntu搭建Android交叉编译环境
  6. Android系列教程:TextView小组件的使用--附带超链接和跑马灯效果
  7. Android(安卓)自定义缩短Toast显示时间
  8. Android客户端对服务端返回的xml文件内容进行解析
  9. 关于Android中android.content.res.Resources$NotFoundException

随机推荐

  1. Android(安卓)之 传感器 应用
  2. Android(安卓)StudioSVN安装和使用
  3. Google Maps Android(安卓)API V2 问题解
  4. Android(安卓)启动过程详解
  5. Android中文API (60) ―― DatePicker.On
  6. 关于 显示和隐藏 Android(安卓)的方法
  7. android sp文件一个键值保存多条信息
  8. android数据持久化总结
  9. [Android] 开发资料收集:依赖注入框架
  10. Android(java)学习笔记92:泛型高级之通配符