profile報(bào)告命令
./gradlew clean app:assembleDebug --profile
1辆脸、debug環(huán)境禁止crashLytics上報(bào)
2、避免Legacy Multidex
記錄
2018-11-06 11:05 clean
gradlew clean app:assembleDebug --profile
1奴迅、修改參數(shù)呜舒,加快build
org.gradle.jvmargs=-Xmx4608M -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
安卓:非發(fā)布版禁用fabric上報(bào),修改jvmargs參數(shù)盐茎,使開發(fā)環(huán)境build時(shí)間降至2min以內(nèi)
http://www.easemob.com/news/852
https://medium.com/exploring-code/how-to-decrease-your-gradle-build-time-by-65-310b572b0c43
debug環(huán)境禁用fabric
非發(fā)布版本關(guān)閉Fabirc
android {
buildTypes {
debug {
// Disable fabric build ID generation for debug builds
ext.enableCrashlytics = false
...
參考:https://www.cnblogs.com/zhou-guobao/p/disable-crashlytics-for-debug-builds.html
2者冤、配置不同的圖標(biāo)
https://blog.csdn.net/MAIMIHO/article/details/76106700?utm_source=blogxgwz4
配置不同app名稱
遇到一個(gè)錯(cuò)誤:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute application@label value=(@string/app_name_debug) from AndroidManifest.xml:86:9-37
is also present at [:react-native-fetch-blob] AndroidManifest.xml:11:18-50 value=(@string/app_name).
Suggestion: add 'tools:replace="android:label"' to <application> element at AndroidManifest.xml:80:5-324:19 to override.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
* Get more help at https://help.gradle.org
按照提示解決肤视,解釋:https://www.2cto.com/kf/201712/702939.html
3、配置不同applicationId
fileprovider 修改涉枫,http://www.reibang.com/p/1afa7d4c0afd 提醒
FileHelp.java中使用父項(xiàng)目的BuildConf.applicationId
4困后、打jsbundle后生成的這個(gè)垃圾文件
D:\Git\pingtai\Portal\android\app\src\main\res\drawable-mdpi\js_commonview_echarts_tpl.html
5、android studio 中distributionUrl使用本地文件
D:\Git\pingtai\Portal\android\gradle\wrapper\gradle-wrapper.properties
6跌宛、修改combile
7蜕猫、開發(fā)環(huán)境使用比android studio 自帶的【apply changes】更牛逼的【JRebel for Android】
- 1、安裝Jrebel插件:https://zeroturnaround.com/software/jrebel-for-android/quick-start/#!/installation
- 2、激活幫助:http://blog.lanyus.com/archives/299.html
生成GUID:https://www.qvdv.com/tools/guid.html
我生成的:http://idea.lanyus.com/E086630D-638A-07A7-58D2-68ED4762D053
8鸟赫、減小APP的體積