解決 "An unexpected error occurred. Please contact [email protected]."
自從加入Firebase library 並在build.gradle 檔案內加入"minifyEnabled true" 後,錯誤訊息接二連三。
今次遇到如下:
04-13 11:21:35.551 9943-10722/hk.lookfor.xxx E/Firebase: An unexpected error occurred. Please contact [email protected]. Details:
java.lang.IllegalArgumentException: Internal error: TypeReference constructed without actual type information
at com.fasterxml.jackson.core.type.TypeReference.(Unknown Source)
at com.firebase.client.authentication.JsonBasicResponseHandler$1.(Unknown Source)
at com.firebase.client.authentication.JsonBasicResponseHandler.handleResponse(Unknown Source)
at com.firebase.client.authentication.JsonBasicResponseHandler.handleResponse(Unknown Source)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:662)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:632)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:621)
at com.firebase.client.authentication.AuthenticationManager$8.run(Unknown Source)
at com.firebase.client.android.AndroidPlatform$2.run(Unknown Source)
04-13 11:21:35.631 9943-10722/hk.lookfor.xxx E/AndroidRuntime: FATAL EXCEPTION: Thread-43305
Process: hk.lookfor.xxx , PID: 9943
java.lang.RuntimeException: java.lang.IllegalArgumentException: Internal error: TypeReference constructed without actual type information
at com.firebase.client.android.AndroidPlatform$2.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Internal error: TypeReference constructed without actual type information
at com.fasterxml.jackson.core.type.TypeReference.(Unknown Source)
at com.firebase.client.authentication.JsonBasicResponseHandler$1.(Unknown Source)
at com.firebase.client.authentication.JsonBasicResponseHandler.handleResponse(Unknown Source)
at com.firebase.client.authentication.JsonBasicResponseHandler.handleResponse(Unknown Source)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:662)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:632)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:621)
at com.firebase.client.authentication.AuthenticationManager$8.run(Unknown Source)
at com.firebase.client.android.AndroidPlatform$2.run(Unknown Source)
在stackoverflow找到方法解決:
-keepattributes Signature,*Annotation*,EnclosingMethod
加入這句便消除了上述Error Message。