bradparks / json-io

Automatically exported from code.google.com/p/json-io
0 stars 0 forks source link

Android SDK 1.6, I am getting the following errors #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Android SDK 1.6, I am getting the following errors

E/AndroidRuntime(309): java.lang.VerifyError: 
com.cedarsoftware.util.io.JsonWriter

Original issue reported on code.google.com by mg5812 on 15 Mar 2012 at 5:43

Attachments:

GoogleCodeExporter commented 9 years ago
Android SDK <= 4: This constructor IOException(String str, Throwable t) Does 
not exist.

so, please do not use :throw new IOException("", e);

My English is not good, please forgive.

Original comment by mg5812 on 15 Mar 2012 at 6:06

GoogleCodeExporter commented 9 years ago
The IOException constructor that takes a String and a Throwable has been with 
the Android API since Andriod 2.3 PI level 9.  This is available since 
Gingerbread which was before Android's mass adoption.  (See 
http://developer.android.com/resources/dashboard/platform-versions.html). 

Since the source code for json-io is simply two source files (JsonReader.java 
and JsonWriter.java), I suggest adding them directly to your project, and then 
just change the constructor to one of the level 4 API versions.  This way, your 
project works fine, and we can keep the json-io code unchanged.  Using the 
String, Throwable constuctor provides more information to the user in the case 
of an error. 

Original comment by jdereg@gmail.com on 17 Mar 2012 at 4:05

GoogleCodeExporter commented 9 years ago
The change for this is done now.

Original comment by jdereg@gmail.com on 18 Apr 2012 at 12:47

GoogleCodeExporter commented 9 years ago
officially fixed, tested, and closed.

Original comment by jdereg@gmail.com on 29 Sep 2013 at 1:48