当前位置:网站首页>Cososcreator upgrade gradle version
Cososcreator upgrade gradle version
2022-07-24 08:13:00 【sirria1】
In this paper, the reference :https://forum.cocos.org/t/topic/103837 ( Refer directly to this link for more details .)
- Cocos Creator 2.4.2
- Gradle 6.7.1( plug-in unit 4.2.1)
cocos Release native version , Do not add other package references , Generally, there is no need to upgrade gradle Of , But some channels sdk The package uses a more advanced version gradle The function of , Lead to our own engineering projects gradle Outdated Version , Have to upgrade compatibility .
step
1. The original version
Cocos Creator 2.4.2 packaged Android In Engineering gradle The version is 4.10.3( plug-in unit 3.2.0)
2. modify gradle Version number
use Android Studio open Cocos Creator Generated Android engineering , Point file ->Project Structure , stay Project Structure Select... In the panel Project. Enter directly on the right Gradle And the version number of the plug-in . after Android Studio I will download the corresponding version for myself .

3. modify setting.gradle To configure
File path :
jsb-default/frameworks/runtime-src/proj.android-studio/setting.gradle
Before the change :
include ':libcocos2dx',':game', ':instantapp'
After modification :
include ':libcocos2dx'
Reason for modification : Unwanted game, In less than This module is for Google Instant The use of , You can also directly shield the corresponding module .
4. modify CocosAndroid.mk
File path :
jsb-default/frameworks/runtime-src/proj.android-studio/jni/CocosAndroid.mk
Before the change :
LOCAL_MODULE := cocos2djs_shared
After modification :
LOCAL_MODULE := cocos2djs
Reason for modification :Android Studio Build It's a mistake , Can't find target “cocos2djs”
5. modify app/build.gradle
File path :
jsb-default/frameworks/runtime-src/proj.android-studio/app/build.gradle
Before the change :
android.applicationVariants.all { variant ->
// delete previous files first
delete "${buildDir}/intermediates/merged_assets/${variant.dirName}"
variant.mergeAssets.doLast {
def sourceDir = "${buildDir}/../../../../.."
copy {
from "${sourceDir}/assets"
into "${outputDir}/assets"
}
copy {
from "${sourceDir}/src"
into "${outputDir}/src"
}
copy {
from "${sourceDir}/jsb-adapter"
into "${outputDir}/jsb-adapter"
}
copy {
from "${sourceDir}/main.js"
from "${sourceDir}/project.json"
into outputDir
}
}
}
After modification :
android.applicationVariants.all { variant ->
// delete previous files first
delete "${buildDir}/intermediates/merged_assets/${variant.dirName}"
// modify Alarm error API 'variant.getMergeAssets()' is obsolete and has been replaced with 'variant.getMergeAssetsProvider()'.It will be removed at the end of 2019.
// variant.mergeAssets.doLast {
variant.mergeAssetsProvider.get().doLast{
def sourceDir = "${buildDir}/../../../../.."
copy {
from "${sourceDir}/assets"
into "${outputDir}/assets"
into outputDir.dir("assets")
}
copy {
from "${sourceDir}/src"
into "${outputDir}/src"
into outputDir.dir("src")
}
copy {
from "${sourceDir}/jsb-adapter"
into "${outputDir}/jsb-adapter"
into outputDir.dir("jsb-adapter")
}
copy {
from "${sourceDir}/main.js"
from "${sourceDir}/project.json"
into outputDir
}
}
}
Reason for modification : Resource replication is missing . It's basically to put into "${outputDir}/x" Change to into outputDir.dir("x")
边栏推荐
- The vision group of Hegong University Sky team trained day3 - machine learning, strengthened the use of Yolo models, and learned pumpkin books and watermelon books
- EZDML逆向工程导入数据库分析实操教程
- Learn - use do... While loop according to the formula e=1+1/1+ 1/2!+ 1/3!+…+ 1/n! Calculate the value of E (accuracy is 1e-6)
- Svg from entry to regret, why not learn it earlier (graphic version)
- Qt|字符串生成二维码功能
- Installation and use of CONDA
- *Code understanding *numpy basic (plus code) that must be understood
- Introduction to webmethods
- Use of ArrayList
- *Yolo5 learning * data experiment based on yolo5 face combined with attention model se
猜你喜欢
![[matlab] (III) application of MATLAB in Higher Mathematics](/img/ff/72b13fb597d5bdf3a989dd86cb6888.png)
[matlab] (III) application of MATLAB in Higher Mathematics
![[MySQL] installation tutorial and master-slave configuration](/img/79/0ad3f68b69a0a03a62422d4cc70035.png)
[MySQL] installation tutorial and master-slave configuration

Decision tree - ID3, C4.5, cart

Image feature Harris corner detection
![[Game Collection] mobile phones are about to burst, and a collection of six high-quality pyGame games is coming ~ (source code attached)](/img/9e/b237bfa891bd2beb9c1b8a612e9090.png)
[Game Collection] mobile phones are about to burst, and a collection of six high-quality pyGame games is coming ~ (source code attached)

生成模型与判别模型

Generative model and discriminant model

Kotlin higher order function & DSL layout persuasion Guide

MySQL --- 子查询 - 标量子查询

Perceptron and multilayer neural network, back propagation and computational graph
随机推荐
Jetson AgX Orin source change
P1739 expression bracket matching problem solution
Case practice - panoramic image mosaic: feature matching method
jmeter中JSON提取器使用
JSON extractor use in JMeter
【golang从入门到实践】学生成绩管理系统
Error reported by Nacos: error Nacos failed to start, please see d:\nacos\logs\nacos log for more details.
SIFT feature point extraction
Robot operation continuous learning thesis (1) original text reading and Translation -- primitive generation strategy learning without catastrophic forgetting in robot operation
Do you know the use of string?
P1305 new binary tree solution
EZDML逆向工程导入数据库分析实操教程
As skillfully uses idea annotation to improve collaboration / development efficiency
My six months at Microsoft
Summary of study notes (I)
MySQL --- 子查询 - 标量子查询
Vidar-Team战队专访:AS WE DO, AS YOU KNOW.
Kubernetes: (I) basic concepts
[MySQL] installation tutorial and master-slave configuration
Figure New Earth: how the RVT format BIM model modeled by Revit can accurately match the map with texture