登录 用户中心() [退出] 后台管理 注册
   
您的位置: 首页 >> SoftHub关联区 >> 主题: [asd/Android Studio]asd 中修改 targetSdkVersion 的方法     [回主站]     [分站链接]
[asd/Android Studio]asd 中修改 targetSdkVersion 的方法
clq
浏览(269) - 2019-04-25 15:49:37 发表 编辑

关键字: android studio

[2019-04-25 15:51:27 最后更新]

[asd/Android Studio]asd 中修改 targetSdkVersion 的方法

看到很多网友说改不了,其实还是中以的.不过改了之后用处似乎并不大.

方法是直接修改 app/build.gradle 文件

--------------------------------------------------

apply plugin: 'com.android.application'

android {
compileSdkVersion 22 //28
//------------------------------
//根据 asd 2019 加的忽略 targetSdkVersion 警告
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
}
//------------------------------
defaultConfig {
applicationId "com.example.administrator.myapplication"
minSdkVersion 15
targetSdkVersion 15 //很多模拟器用不了 28 ,改小会怎样?//2019 这个版本的 asd 默认是 28,google play 目前需要至少 26
//改小了又打包不出签名的 apk
//15 对应 4.0.3
//14 对应 4.0.0
//另外还有一种单字符的表示方法 https://blog.csdn.net/itluochen/article/details/53318784
//根据 https://www.jianshu.com/p/2d2a82fdf54a 的说法 4.0.0 的机器是没有的,所以 15 就够了
//加 lintOptions 选项后可以在 asd 中改小,但是模拟器仍然安装不上,奇怪的是直接调试可以
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
//https://github.com/ybq/Android-SpinKit 图标,不过下载到哪去了//应该在 .gradle 目录中,不过这样就要每次下载
//还会导致设计器失效,感觉用来测试完还是手工加入一次为好
//implementation 'com.github.ybq:Android-SpinKit:1.2.0'

implementation 'com.nex3z:flow-layout:1.2.4'
}





总数:0 页次:1/0 首页 尾页  
总数:0 页次:1/0 首页 尾页  


所在合集/目录
android_studio 更多



发表评论:
文本/html模式切换 插入图片 文本/html模式切换


附件:



NEWBT官方QQ群1: 276678893
可求档连环画,漫画;询问文本处理大师等软件使用技巧;求档softhub软件下载及使用技巧.
但不可"开车",严禁国家敏感话题,不可求档涉及版权的文档软件.
验证问题说明申请入群原因即可.

Copyright © 2005-2020 clq, All Rights Reserved
版权所有
桂ICP备15002303号-1