首页 > 其他分享 >打开别人Android项目的方法

打开别人Android项目的方法

时间:2022-12-21 12:39:28浏览次数:44  
标签:项目 implementation 指定 别人 Android 打开 com android


将app/src/build.gradle中的所有版本号都改为和自己对应的

apply plugin: 'com.android.application'
android {
compileSdkVersion 26 //指定项目的编译版本
buildToolsVersion "26.0.2" //指定项目构建工具的版本
defaultConfig {
applicationId "com.example.uibestpractice" //指定项目的包名
minSdkVersion 24 //指定项目最低兼容的Android系统版本
targetSdkVersion 26 //指定项目期望的Android系统版本
versionCode 1 //指定项目的版本号
versionName "1.0" //指定项目的版本名。在安装文件时非常重要
}
buildTypes { //指定安装文件的相关配置
release { //指定生成正式版安装文件的配置。还有一个是debug闭包通常不写
minifyEnabled false //指定是否对项目代码进行混淆
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' //指定混淆时使用的规则文件
}
}
}
dependencies { //指定当前项目所有的依赖关系。3.0之前是compile,3.0之后是implementation。
implementation fileTree(dir: 'libs', include: ['*.jar']) //本地依赖声明
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:appcompat-v7:26.1.0' //远程依赖声明
implementation 'com.android.support:recyclerview-v7:26.1.0'

文件->项目结构->Project。中的所有数据改为和自己环境一样的

标识

修改为(和自己环境一样)

Gradle version

4.1

Android Plugin Version

3.0.0

Android Plugin Repository

google(), jcenter

Default Library Repository

google(), jcenter

标签:项目,implementation,指定,别人,Android,打开,com,android
From: https://blog.51cto.com/u_12606187/5959773

相关文章