Google GsonがAndroidに加入し、パッケージ化して署名を混同した後に発生したエラー

912 ワード

Google GsonがAndroidに加入し、パッケージ化して署名を混同した後に発生したエラー
Debug署名が正常である場合、releaseで次のエラーが発生します.
Googleで試した方法はすべて無効ですfuck...
02-04 00:21:09.685: E/TopicDetailHandler(4774): java.lang.TypeNotPresentException: Type com.haobao.wardrobe.io.model.FormCell not present
1) Download jarjar (http://code.google.com/p/jarjar/downloads/list)
2) Put jarjar-1.0.jar and gson-1.5.jar in the same folder
3) Create a new text file in this folder (rules.txt)
4) Write the following line in the textfile: rule com.google.gson.** com.google.myjson.@1
5) From the commandline, open jarjar with the command "java -jar jarjar.jar process rules.txt gson-1.5.jar myjson-1.5.jar"
6) Replace the gson library in your project with myjson and update the imports

きっと多くの人がこの問題に直面しているに違いない.
実はこの問題の根本的な解決策は簡単です.
あなたが宣言したエンティティは、他のクラスに参照され、使用されたことがあります.そうしないと、混同プロファイルにこのクラスが現れなかったので、エラーが表示されます.の