Where can I get a JAR to import libcore.io?

2019-03-27 14:14发布

问题:

I want to handle an GaiException in my App. The debugger tells me, it lives in the libcore.io package, but importing it yields an error. I guess I need to add an additional JAR to my projct to correctly resolve this type. I've been digging a bit in my android sdk folder, but don't seem to find anything of the kind.

Thanks for any advice.

回答1:

If you are using android studio you can add this line to your gradle build (under dependencies).

compile 'org.robovm:robovm-rt:+'

If using Eclipse, check this Maven link and add it however is appropriate.