egret(白鹭引擎)Android Studio发布Android项目发布设置(二)
ChrisXie Lv5

说明:

egret使用Android Studio发布APP因为按照官方文档配置后还会出现其他问题(版本更新慢)

需要注意gradle版本

Ctrl+Shift+Alt+S打开版本设置界面设置对应的版本,Android Studio会下载对应的版本


配置build.gradle,这里注释掉了mavenCentral和删除了jcenter()(这个方法已经被淘汰了),使用了下方代替

1
2
3
4
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {

repositories {
google()
// mavenCentral()
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.1'


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}

allprojects {
repositories {
google()
// mavenCentral()
// maven { url 'https://kotlin.bintray.com/kotlinx' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
flatDir {
dirs 'libs'
}
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

这里注释掉了targetSdkVersion 26和ndk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38

apply plugin: 'com.android.application'

android {
compileSdkVersion 26
defaultConfig {
applicationId "com.jhyb"
minSdkVersion 15
// targetSdkVersion 26
versionCode 1
versionName "1.0"
// ndk {
// abiFilters 'armeabi-v7a'
// }
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
sourceSets {
main {
assets.srcDirs = ['../assets']
jniLibs.srcDirs = ['libs']
}
}
// buildToolsVersion '26.0.2'
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}

dependencies {
compile(name: 'egret', ext: 'aar')
}

 评论
相关文章
标签云 更多