r8

GC overhead limit exceeded when enable R8 Shrinker in Android Studio 3.4

一世执手 提交于 2020-01-01 08:03:53
问题 I'm using Android Studio 3.4 (Canary 9), when I build my app, it failed with the following error Task :app:transformClassesAndResourcesWithR8ForDebug R8 is an experimental feature. If you experience any issues, please file a bug at https://issuetracker.google.com, using 'Shrinker (R8)' as component name. You can disable R8 by updating gradle.properties with 'android.enableR8=false'. AGPBI: {"kind":"warning","text":"Missing class: java.lang.instrument.ClassFileTransformer","sources":[{}],"tool

华为路由器配置OSPF

陌路散爱 提交于 2019-12-18 01:44:20
OSPF是什么 OSPF(Open Shortest Pass First, 开放最短路径优先协议 ), 是一个最常用的内部网管协议 , 是一个链路状态协议。 使用场景:适用于运营商、政府机构等大型网络中多节点要求互联互通 网络结构:支持两层结构 1 骨干区域 2 子区域 OSPF基于IP OSPF不属于网络层协议 PC12 配置好 IP 信息后启动 PC13 同样操作配置好IP信息后启动 路由设备配置部分 R6 基础环境配置 <Huawei>system-view # 切换模式 [Huawei]sysname R6 # 给设备起个名字 R6 [R6]display ip interface brief # 查看设备接口信息 [R6]int GigabitEthernet 0/0/0 # 进入 GE 0 接口 [R6]ip add 10.0.1.1 24 # 配置 IP [R6]q # 退出并返回上一级目录 [R6]int GigabitEthernet 0/0/1 [R6-GigabitEthernet0/0/1]ip add 20.0.2.1 24 [R6-GigabitEthernet0/0/1] [R6-GigabitEthernet0/0/1]display ip interface brief R8 基础环境配置 <Huawei> <Huawei>system-view

Proguard (R8) negate operator not working to keep anything except certain packages

折月煮酒 提交于 2019-12-17 21:22:06
问题 The negator (exclamation mark) in proguard should allow me to keep anthing but the apache libraries: -keep class !org.apache.** According to those answers. That's the way to go: How to negate classname with Proguard Enable Proguard for only two packages in large Android application Android proguard Ignore All Classes except of one Proguard Android do not obfuscate anything except few classes Proguard: How to keep everything except specific condition? Can we shrink all classes but only

How to make R8 + proguard-android-optimize.txt + Google Drive API works seamlessly?

拟墨画扇 提交于 2019-12-12 12:21:49
问题 This is our R8 version Current version is: 1.4.94 (build 390954928f0db9c3b888a367f7f128ce3bbfb160 from go/r8bot (luci-r8-ci-archive-0-5g74)). When I switch from buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } to buildTypes { release { minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } We're getting the following error. com.google.api.client

Circular reference error in firebase with R8

我怕爱的太早我们不能终老 提交于 2019-12-10 16:39:27
问题 We are getting following error with Firebase and R8. [CIRCULAR REFERENCE:java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: Multiple entries with same key: Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String=Encoded method Method com.google.firebase.iid.FirebaseInstanceId.zza Proto LLL com.google.android.gms.tasks.Task java.lang.String java.lang.String and Method com.google.firebase.iid

When using R8 on Android, do I need to uninstall my existing Proguard?

雨燕双飞 提交于 2019-12-04 12:33:19
问题 Do I need to remove Proguard related code from Gradle when using R8? minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' 回答1: You don't actually remove the proguard rules, as R8 works with Proguard rules in compat mode . For more details, please refer to https://android-developers.googleblog.com/2018/11/r8-new-code-shrinker-from-google-is.html. R8 is available with Android Studio 3.3 beta and works with Proguard rules. To try it, set

When using R8 on Android, do I need to uninstall my existing Proguard?

匆匆过客 提交于 2019-12-03 08:09:58
Do I need to remove Proguard related code from Gradle when using R8? minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' You don't actually remove the proguard rules, as R8 works with Proguard rules in compat mode . For more details, please refer to https://android-developers.googleblog.com/2018/11/r8-new-code-shrinker-from-google-is.html . R8 is available with Android Studio 3.3 beta and works with Proguard rules. To try it, set the following in your project's gradle.properties file: android.enableR8=true But for the full mode , it is

爬取汽车之家

吃可爱长大的小学妹 提交于 2019-12-02 05:45:24
目录 依赖 简单爬取汽车之家新闻页首页 爬取新闻页前一百页 多线程爬取汽车之家新闻页前100页 线程池爬取汽车之家新闻页前100页 进程池爬取汽车之家新闻页前100页 混爬汽车之家好多页 依赖 爬取汽车之家用到了Python的两个库: requests:模拟浏览器发送请求 BeautifulSoup4:解析爬取的数据 这两个库都需要我们手动下载: pip install requests pip install BeautifulSoup4 简单爬取汽车之家新闻页首页 import os import requests from bs4 import BeautifulSoup base_dir = os.path.dirname(__file__) def spider(): '''基础版爬取汽车之家新闻页''' response = requests.get(url='https://www.autohome.com.cn/news/') # print(response) # 状态码 # print(response.status_code) # 状态码 # print(response.headers) # 响应头 # print(response.text) # 文本内容为中文内容为乱码,可以查看charset=gb2312 response.encoding =

DSL element 'useProguard' is obsolete and will be removed soon. Use 'android.enableR8' in gradle.pro

陌路散爱 提交于 2019-11-28 05:05:19
gradle升级到com.android.tools.build:gradle:3.5.0这个版本之后就出现标题这个提示: DSL element ‘useProguard’ is obsolete and will be removed soon. Use ‘android.enableR8’ in gradle.properties 出现这个警告是因为build.gradle里配置了 'useProguard’属性,而这个属性将很快被移除,使用‘android.enableR8’来代替,解决的办法就是在项目的gradle.properties文件里加上下面这句: android.enableR8 = true 关于R8: R8 一步到位地完成了所有的缩减(shrinking),去糖(desugaring)和 转换成 Dalvik 字节码(dexing )过程。 缩减(shrinking)过程实现以下三个重要的功能: 压缩:从代码中移除无用的类、段、方法等。 优化:使代码在指令级更小,更高效。 混淆:使用简短无意义的名称重命名代码里剩余的类,字段和方法。 R8 和当前的代码缩减解决方案 Proguard 相比,R8 可以更快地缩减代码,同时改善输出大小。下面将通过几张数据图来对比(数据源自于 benchmark): 链接:https://juejin.im/post

Android/java: Transition / Migration from ProGuard to R8?

為{幸葍}努か 提交于 2019-11-27 09:25:19
I wonder how to make the transition / migration from ProGuard to R8 . Should I just remove the Proguard-related lines from my Gradle files and add the android.enableR8 = true line instead ? Thanks. shizhen Proguard is developed and maintained by GuardSquare while R8 is developed and maintained by Android team which means they are two different products although R8 is compatible with Proguard. As seen from here https://www.guardsquare.com/en/blog/proguard-and-r8 Compatibility of ProGuard and R8 The good news for developers is that R8 is backward compatible with ProGuard. If you have a working