首页   注册   登录
 feilong 最近的时间轴更新

feilong

V2EX 第 191822 号会员,加入于 2016-09-15 08:30:12 +08:00
求一个能够互换两段文本的正则表达式
问与答  •  feilong  •  178 天前  •  最后回复来自 HiHi
8
关于安卓 release 版本闪退的问题
问与答  •  feilong  •  337 天前  •  最后回复来自 feilong
9
树莓派 ipv6 无法访问网络
问与答  •  feilong  •  2017-10-14 13:53:39 PM  •  最后回复来自 feilong
4
feilong 最近回复了
178 天前
回复了 feilong 创建的主题 问与答 求一个能够互换两段文本的正则表达式
@ys0290 于是说一个正则表达式可以实现么?我知道一般的话可以像 @F0nebula 那样,但是这种情况如何解决?
178 天前
回复了 feilong 创建的主题 问与答 求一个能够互换两段文本的正则表达式
@imn1 嗯,字符串不在一行的

之前是三次替换,先把 aaa 替换成别的,再把 ccc 替换成 aaa,最后再把 aaa 换回来,但是我感觉三次替换有点太蠢了,所以问一问大家这种有没有办法一次替换完成
179 天前
回复了 feilong 创建的主题 问与答 求一个能够互换两段文本的正则表达式
补充一下,不要先把 aaa 替换成别的再替换回来这种
337 天前
回复了 feilong 创建的主题 问与答 关于安卓 release 版本闪退的问题
@Jimjay
2 楼有 android monitor 的日志,和 logcat 一不一样我就不知道了
337 天前
回复了 feilong 创建的主题 问与答 关于安卓 release 版本闪退的问题
我跑到 fresco 官网上,参考(抄上)这个( https://www.fresco-cn.org/docs/proguard.html)[https://www.fresco-cn.org/docs/proguard.html],然后编译可以运行了(ಥ _ ಥ)

@XinLake @zjp
感谢两位大佬指出问题
337 天前
回复了 feilong 创建的主题 问与答 关于安卓 release 版本闪退的问题
@zjp 感谢大佬们分析
fork 别人的项目,这是我头一次看到混淆😭,看到这个文件一脸懵逼,慢慢百度中😭

proguard-rules.pro

```
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in D:\Developer\Android\sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

-optimizationpasses 3

-keepattributes SourceFile, LineNumberTable

# fresco
-keep,allowobfuscation @interface com.facebook.common.internal.DoNotStrip
-keep @com.facebook.common.internal.DoNotStrip class *
-keepclassmembers class * {
@com.facebook.common.internal.DoNotStrip *;
}
-dontwarn okio.**
-dontwarn javax.annotation.**
-dontwarn com.facebook.infer.**

# greenDAO
-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
public static java.lang.String TABLENAME;
}
-keep class **$Properties
-dontwarn org.greenrobot.greendao.database.**
-dontwarn org.greenrobot.greendao.rx.**

# ButterKnife
-keep public class * implements butterknife.internal.ViewBinder { public <init>(); }
-keep class butterknife.*
-keepclasseswithmembernames class * { @butterknife.* <methods>; }
-keepclasseswithmembernames class * { @butterknife.* <fields>; }

# OkHttp3
-keep class okhttp3.** { *; }
-keep interface okhttp3.** { *; }
-dontwarn okhttp3.**

# rhino
-dontwarn org.mozilla.javascript.**
-dontwarn org.mozilla.classfile.**
-keep class org.mozilla.javascript.** { *; }

# jsoup
-keeppackagenames org.jsoup.nodes

# andrroid v4 v7
-dontwarn android.support.v4.**
-dontwarn android.support.v7.**

# rx
-dontwarn sun.misc.**
-keepclassmembers class rx.internal.util.unsafe.*ArrayQueue*Field* {
long producerIndex;
long consumerIndex;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueProducerNodeRef {
rx.internal.util.atomic.LinkedQueueNode producerNode;
}
-keepclassmembers class rx.internal.util.unsafe.BaseLinkedQueueConsumerNodeRef {
rx.internal.util.atomic.LinkedQueueNode consumerNode;
}
```
337 天前
回复了 feilong 创建的主题 问与答 关于安卓 release 版本闪退的问题
@XinLake
按照你的说法,去掉了下面这四行

```
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
shrinkResources true
zipAlignEnabled true
```

然后竟然真的没问题了,但是问题的根本应该不是这里吧
337 天前
回复了 feilong 创建的主题 问与答 关于安卓 release 版本闪退的问题
上网查了一推,看了 android monitor 的记录

错误是这么说的
> 03-22 19:02:03.516: W/System.err(4259): at com.hiroshi.cimoc.App.onCreate(App.java:59)

app.java:59 是
> Fresco.initialize(this);


log

```
03-22 19:02:03.374: I/ActivityManager(835): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.hiroshi.cimoc/.ui.activity.MainActivity bnds=[8,474][184,678]} from pid 1118
03-22 19:02:03.397: I/BufferQueue(181): [Starting com.hiroshi.cimoc](this:0xb7faf008,id:1757,api:0,p:-1,c:181) setConsumerName: Starting com.hiroshi.cimoc
03-22 19:02:03.397: I/BufferQueue(181): [Starting com.hiroshi.cimoc](this:0xb7faf008,id:1757,api:0,p:-1,c:181) setDefaultBufferSize: w=1, h=1
03-22 19:02:03.402: I/ActivityManager(835): Start proc com.hiroshi.cimoc for activity com.hiroshi.cimoc/.ui.activity.MainActivity: pid=4259 uid=10142 gids={50142, 3003, 1028, 1015}
03-22 19:02:03.409: I/BufferQueue(181): [Starting com.hiroshi.cimoc](this:0xb7faf008,id:1757,api:0,p:-1,c:181) setDefaultBufferSize: w=720, h=1280
03-22 19:02:03.427: I/BufferQueue(181): [Starting com.hiroshi.cimoc](this:0xb7faf008,id:1757,api:0,p:835,c:181) connect: api=2 producer=(835:system_server) producerControlledByApp=false
03-22 19:02:03.428: I/BufferQueue(181): [Starting com.hiroshi.cimoc](this:0xb7faf008,id:1757,api:2,p:835,c:181) new GraphicBuffer needed
03-22 19:02:03.442: I/GLConsumer(181): [Starting com.hiroshi.cimoc](this:0xb7f897b8,api:2) [void* android::GLConsumer::createImage(EGLDisplay, const android::sp<android::GraphicBuffer>&, const android::Rect&)]
03-22 19:02:03.472: D/dalvikvm(4259): open_cached_dex_file : /data/app/com.hiroshi.cimoc-1.apk /data/dalvik-cache/data@app@com.hiroshi.cimoc-1.apk@classes.dex
03-22 19:02:03.516: W/System.err(4259): at com.hiroshi.cimoc.App.onCreate(App.java:59)
03-22 19:02:03.519: I/dalvikvm(4259): Could not find method android.provider.DocumentsContract.getTreeDocumentId, referenced from method com.hiroshi.cimoc.k.a.a
03-22 19:02:03.555: I/ActivityManager(835): Process com.hiroshi.cimoc (pid 4259) has died.
03-22 19:02:03.578: I/ActivityManager(835): Start proc com.hiroshi.cimoc for activity com.hiroshi.cimoc/.ui.activity.MainActivity: pid=4274 uid=10142 gids={50142, 3003, 1028, 1015}
03-22 19:02:03.659: D/dalvikvm(4274): open_cached_dex_file : /data/app/com.hiroshi.cimoc-1.apk /data/dalvik-cache/data@app@com.hiroshi.cimoc-1.apk@classes.dex
03-22 19:02:03.681: W/System.err(4274): at com.hiroshi.cimoc.App.onCreate(App.java:59)
03-22 19:02:03.683: I/dalvikvm(4274): Could not find method android.provider.DocumentsContract.getTreeDocumentId, referenced from method com.hiroshi.cimoc.k.a.a
03-22 19:02:03.703: I/ActivityManager(835): Process com.hiroshi.cimoc (pid 4274) has died.
03-22 19:02:03.715: I/ActivityManager(835): Start proc com.hiroshi.cimoc for activity com.hiroshi.cimoc/.ui.activity.MainActivity: pid=4292 uid=10142 gids={50142, 3003, 1028, 1015}
03-22 19:02:03.766: D/dalvikvm(4292): open_cached_dex_file : /data/app/com.hiroshi.cimoc-1.apk /data/dalvik-cache/data@app@com.hiroshi.cimoc-1.apk@classes.dex
03-22 19:02:03.791: W/System.err(4292): at com.hiroshi.cimoc.App.onCreate(App.java:59)
03-22 19:02:03.793: I/dalvikvm(4292): Could not find method android.provider.DocumentsContract.getTreeDocumentId, referenced from method com.hiroshi.cimoc.k.a.a
03-22 19:02:03.813: I/ActivityManager(835): Process com.hiroshi.cimoc (pid 4292) has died.
03-22 19:02:03.813: W/ActivityManager(835): Force removing ActivityRecord{42d5b380 u0 com.hiroshi.cimoc/.ui.activity.MainActivity t238}: app died, no saved state
03-22 19:02:03.816: I/BufferQueue(181): [Starting com.hiroshi.cimoc](this:0xb7faf008,id:1757,api:2,p:-1,c:181) disconnect: api=2
03-22 19:02:03.816: I/BufferQueue(181): [Starting com.hiroshi.cimoc](this:0xb7faf008,id:1757,api:0,p:-1,c:181) getReleasedBuffers: returning mask 0xffffffff
03-22 19:02:03.816: I/GLConsumer(181): [Starting com.hiroshi.cimoc](this:0xb7f897b8,api:0) destroying EGLImage dpy=0x1 img=0x10000013
03-22 19:02:03.824: I/BufferQueue(181): [Starting com.hiroshi.cimoc](this:0xb7faf008,id:1757,api:0,p:-1,c:-1) consumerDisconnect
03-22 19:02:03.825: I/BufferQueue(181): [Starting com.hiroshi.cimoc](this:0xb7faf008,id:1757,api:0,p:-1,c:-1) ~BufferQueue
03-22 19:02:03.825: D/ConsumerBase(181): [Starting com.hiroshi.cimoc] onLastStrongRef

```
2018-01-08 23:05:08 +08:00
回复了 F2Sky 创建的主题 问与答 你能忍受电视开机广告吗?
幸好之前买的普通电视,加上个安卓盒子
2018-01-08 01:15:06 +08:00
回复了 dangyuluo 创建的主题 奇思妙想 ROS(Robot Operation System)有什么搭配的好玩硬件?
pixhawk 飞机挺好玩的
关于   ·   FAQ   ·   API   ·   我们的愿景   ·   广告投放   ·   感谢   ·   实用小工具   ·   2322 人在线   最高记录 4385   ·  
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.3 · 12ms · UTC 07:16 · PVG 15:16 · LAX 23:16 · JFK 02:16
♥ Do have faith in what you're doing.
沪ICP备16043287号-1