问题
I am trying to use GSON in Android app but it causes a crash. After some reading it seems that HTC have included GSON and that causes a conflict. One propoused solution was to use jarjar.jar to rename gson classes to solve the conflict. When I try to do this I get this error:
Syntax error: Error on line 1: [{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf360]
The command I am executing:
java -jar jarjar-1.2.jar process rules.txt gson-2.1.jar myjson-2.1.jar
rules.txt: rule com.google.gson.** com.google.myjson.@1
Any ideas?
回答1:
I had no problems using GSON, on any phone. Which problems are you facing?
Besides, it would seem that the rules.txt file you are passing is actually a RTF file. If you are using a Mac, try to save it again as a plain text file.
来源:https://stackoverflow.com/questions/10266143/gson-htc-desire-conflict-possible-solution-jarjar-jar-causes-error