Chinaunix首页 | 论坛 | 博客
  • 博客访问: 267303
  • 博文数量: 74
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 668
  • 用 户 组: 普通用户
  • 注册时间: 2013-04-09 17:34
文章分类

全部博文(74)

文章存档

2017年(1)

2016年(13)

2015年(24)

2014年(9)

2013年(27)

我的朋友

分类: Android平台

2016-11-03 14:35:51

在android studio中添加system权限:



点击(此处)折叠或打开

  1. apply plugin: 'com.android.application'

  2. android {
  3.     compileSdkVersion 24
  4.     buildToolsVersion "24.0.2"
  5.     defaultConfig {
  6.         applicationId "com.whiteskycn.hitool"
  7.         minSdkVersion 16
  8.         targetSdkVersion 24
  9.         versionCode 1
  10.         versionName "1.0"
  11.         testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
  12.     }
  13.     buildTypes {
  14.         release {
  15.             minifyEnabled false
  16.             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
  17.         }
  18.     }
  19. }

  20. dependencies {
  21.     compile fileTree(dir: 'libs', include: ['*.jar'])
  22.     androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
  23.         exclude group: 'com.android.support', module: 'support-annotations'
  24.     })
  25.     compile 'com.android.support:appcompat-v7:24.2.1'
  26.     testCompile 'junit:junit:4.12'
  27.     provided files(getLayoutLibPath())
  28. }


  29. /** get layoutlib.jar path.
  30.  * android.os.SystemProperties need it. */
  31. // must called after "android" definition
  32. def getLayoutLibPath() {
  33.     return "${android.getSdkDirectory().getAbsolutePath()}" + "/platforms/" +
  34.             android.compileSdkVersion + "/data/layoutlib.jar"
  35. }

阅读(616) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~