-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
problems in installing library, problems with Processor.java #3
Comments
Hi, Try to import the project as a Library Project, not an android application. This should be solve your problems. |
Thanks for your reply. I didn't get any compiler error on my laptop but got the 2 errors I mentioned on my desktop compiler. I used the following workaround the 2 errors. Please tell if these workarounds are okay. If so, you can also update them in the source code. I was getting compile time error in line 625 in Processor,java where mParserFactory.getParser(resource.getClass()) was causing problem. I realized that .getClass() returns Class<?>, whereas mParserFactory.getParser needs Class <T extend Resource) as parameter. So I made the following modification inside the parseToInputStream method using explicit type casting:
The error vanished. I hope that this will not cause any runtime error. Will it? For the other error in line 523, I explicitly used Resource.class in the getResourcePersistable method:
Please tell if this would work and there would be no runtime errors 2 more errors I noticed in the OrmLiteJacksonExample. On running the ORMLitJacksonModuleExample, directly downloading from GitHub and only making the above 2 changes, when I run I get runtime error. Is there a working example anywhere? Thanks in advance |
The first modification should be right (I guess) but the second is not. You certainly will have a dynamic cast exception at runtime. I suggest you to switch on develop branch and tell me if it solves the issue. It seems the master release is not stable (which is very bad...). For ORMLiteJacksonModuleExample it's not up to date (few refactoring didn't passed into the master release as you mentionned it), but the module ORMLiteJacksonModule itself should be up to date. You can find complete guide on my website at : http://pcreations.fr/restdroid-guides |
In Eclipse, when I import the RestDroid folder initially as an android application, then 2 errors are occuring in Processor.java
Error#1 in line 523:
Type mismatch: cannot convert from Persistable<capture#75-of ? extends Resource> to Persistable
Error#2 in line 625
Type mismatch: cannot convert from Parser<capture#97-of ? extends Resource> to Parser
I have not added any code from my side yet, but these errors do not seem to go
The text was updated successfully, but these errors were encountered: