我已经包含以下行来保存包中的所有文件.
-keep class com.fasterxml.** { *; }
Run Code Online (Sandbox Code Playgroud)
我得到以下异常.
Caused by: java.lang.IllegalArgumentException: Internal error: TypeReference constructed without actual type information
at com.fasterxml.jackson.core.type.TypeReference.<init>(SourceFile:36)
Run Code Online (Sandbox Code Playgroud) 我刚刚发现 Firebase 有一些很奇怪的东西,我想知道是我做错了什么,或者是否有解决这个问题的方法。
基本上,这就是我在开发应用程序时一直写的内容(这正是我所期望的):
nscoachtools@gmail¸com
maxMatches: 60
maxPlayers: 500
maxTeams: 30
userId: "SnMuRZEVqyN***...***hv2"
userMail: "nscoachtools@gmail.com"
userName: "Nicola Salvaro"
userPicture: "https://lh4.googleusercontent.com/-L7lSPz0VJ9A/..."
userToken: -1
这是我在发布模式下构建应用程序后所写的内容:
nsalvaro77@gmail¸com
a: "Nicola Salvaro"
b: "ESjqwuh***...***wg1"
c: "nsalvaro77@gmail.com"
d: "https://lh4.googleusercontent.com/-2kwSEmLEN1c/..."
e: -2
f: 30
g: 500
h: 60
userToken: 1499775285255
每个“标题”都被一个字母代替。而 "e: " 应该是 "userToken: " 然后,当我尝试更新它时,它用正确的字符串写了它,但不是在原始值的顶部......只是写了一个新的。然后,当我尝试读取完整用户时,它会获得“e:”的值,而不是“userToken:”的值。
我做错什么了吗?
在设备或模拟器上运行应用程序时,数据完美检索,但生成发布apk时不显示图像
我认为问题是由于 proguard 所以我尝试了这个答案 /sf/answers/1839223641/
但它不起作用。
这是我的 proguard_rules.pro
-dontwarn org.w3c.dom.**
-dontwarn org.joda.time.**
-dontwarn org.shaded.apache.**
-dontwarn org.ietf.jgss.**
-dontwarn com.firebase.**
-dontnote com.firebase.client.core.GaePlatform
-keepattributes Signature
-keepattributes *Annotation*
-keepattributes InnerClasses,EnclosingMethod
-keep class com.images.backgrounds.** { *; }
-keep class com.firebase.** { *; }
-keepnames class com.fasterxml.jackson.** { *; }
-keepnames class javax.servlet.** { *; }
-keepnames class org.ietf.jgss.** { *; }
-keep class com.firebase.** { *; }
-keep class org.apache.** { *; }
-keepnames class com.fasterxml.jackson.** { *; }
-keepnames class javax.servlet.** { *; } …Run Code Online (Sandbox Code Playgroud) 我是 android 初学者,我写过这样的代码。如果我启用 minifyEnabled = true,该特定代码不会触发,我也不知道如何正确调试(我只能记录)。我该怎么办?
DatabaseReference database = FirebaseDatabase.getInstance().getReference().child("ConversationUser").child(FirebaseAuth.getInstance().getUid());
database.addChildEventListener(new ChildEventListener() {
@Override
public void onChildAdded(DataSnapshot dataSnapshot, String s) {
ConversationUser conversationUser = dataSnapshot.getValue(ConversationUser.class);
Log.e("Chat", conversationUser.toString());
Log.e("Chat Status", conversationUser.getStatus());
String status = conversationUser.getStatus();
if (status != null && status.toLowerCase().equals("active")) {
//TODO: this never trigger if minifyEnabled = true
retrieveConversation(conversationUser.getId());
EventBus.getDefault().post(new ChatDetailAdapter.ReceiveMessage());
}
}
@Override
public void onChildChanged(DataSnapshot dataSnapshot, String s) {
Log.e("ChatHelper", "onChildChanged");
ConversationUser conversationUser = dataSnapshot.getValue(ConversationUser.class);
if (conversationUser.getStatus().toLowerCase().equals("delete")) {
for(Iterator<Map.Entry<String, Conversation>> it = mainMessage.getConversations().entrySet().iterator(); it.hasNext(); ) {
Map.Entry<String, …Run Code Online (Sandbox Code Playgroud)