Skip to content
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

Invalid inferred types error on build #2

Open
SkeLLLa opened this issue Apr 17, 2013 · 11 comments
Open

Invalid inferred types error on build #2

SkeLLLa opened this issue Apr 17, 2013 · 11 comments

Comments

@SkeLLLa
Copy link

SkeLLLa commented Apr 17, 2013

When I try to build it I've get such errors in 'core/Processor.java':

java: invalid inferred types for P; inferred type does not conform to declared bound(s)
inferred: fr.pcreations.labs.RESTDroid.core.Persistable<fr.pcreations.labs.RESTDroid.core.ResourceRepresentation<?>>
bound(s): fr.pcreations.labs.RESTDroid.core.Persistable<capture#1 of ? extends fr.pcreations.labs.RESTDroid.core.ResourceRepresentation>

Error appears in 327,399,432,482 lines.
Java 1.7.0, Android API 4.2.2. Both Linux and Windows x86_64.

@PCreations
Copy link
Owner

Which version are tout using ? Try to fix the project properties on RESTDroid. Since you are on java 1.7 that may fix the errer.

@SkeLLLa
Copy link
Author

SkeLLLa commented Apr 17, 2013

I tried to use it with jdk 1.6 but got same error while bulding restdroid module. If I create a new app with eclipse and add restdroid as module (without building it) application launches. But if I create identical app with intellij idea it reports those error when I try to run my app. On eclipse on I get same errors if I try to build only restdroid without an app.

@PCreations
Copy link
Owner

You can't build RESTDroid since it's only a library project but I think you know that but it's quite weird that Eclipse report you an error. At which line the error occurs exactly in Processor class ?

@SkeLLLa
Copy link
Author

SkeLLLa commented Apr 17, 2013

The easiest way to reproduce error is just to create app with IDEA and add RESTDroid as library. When it starts to make main project (app) it also makes RESTDroid and throws 4 errors. As I've wrote in first post error appears in 327,399,432,482 lines of processor.java. Language level is set to 6.0.

More details for errors:
Information:Using javac 1.7.0_21 to compile java sources
Information:java: Errors occurred while compiling module 'RESTDroid'
Information:Module "RESTDroid" was fully rebuilt due to project configuration/dependencies changes
Information:Compilation completed with 4 errors and 0 warnings in 3 sec
Information:4 errors
Information:0 warnings
C:\dev\RESTDroid\src\fr\pcreations\labs\RESTDroid\core\Processor.java
Error:Error:line (327)java: invalid inferred types for P; inferred type does not conform to declared bound(s)
inferred: fr.pcreations.labs.RESTDroid.core.Persistable<fr.pcreations.labs.RESTDroid.core.ResourceRepresentation> bound(s): fr.pcreations.labs.RESTDroid.core.Persistable Error:Error:line (399)java: invalid inferred types for P; inferred type does not conform to declared bound(s) inferred: fr.pcreations.labs.RESTDroid.core.Persistable>
bound(s): fr.pcreations.labs.RESTDroid.core.Persistable<capture#2 of ? extends fr.pcreations.labs.RESTDroid.core.ResourceRepresentation>
Error:Error:line (432)java: invalid inferred types for P; inferred type does not conform to declared bound(s)
inferred: fr.pcreations.labs.RESTDroid.core.Persistable<fr.pcreations.labs.RESTDroid.core.ResourceRepresentation<?>>
bound(s): fr.pcreations.labs.RESTDroid.core.Persistable<capture#3 of ? extends fr.pcreations.labs.RESTDroid.core.ResourceRepresentation>
Error:Error:line (482)java: invalid inferred types for P; inferred type does not conform to declared bound(s)
inferred: fr.pcreations.labs.RESTDroid.core.Parser
bound(s): fr.pcreations.labs.RESTDroid.core.Parser<capture#4 of ? extends fr.pcreations.labs.RESTDroid.core.ResourceRepresentation>

@PCreations
Copy link
Owner

I made some changes on develop branch, try to switch on it and tell me if the errors occur again

@SkeLLLa
Copy link
Author

SkeLLLa commented Apr 23, 2013

Nothing changed. Same errors.

@PCreations
Copy link
Owner

I never tried to use intellij idea so I will use it to make RESTDroid compatible with it as soon as possible ;)

@SkeLLLa
Copy link
Author

SkeLLLa commented Apr 23, 2013

May be this topics will help:
http://stackoverflow.com/questions/8935185/how-do-i-use-java-generic-wildcards-with-methods-taking-more-than-one-generic-pa

http://stackoverflow.com/questions/9996677/generics-issue-inferred-type-does-not-conform-to-declared-bounds?rq=1

It seems that it's not only idea issue, because I got it in eclipse also. May be idea follows some java standards more strictly or possibly it uses something old...

@PCreations
Copy link
Owner

It seems the error comes to the compilator your are using. Are you using openjdk instead of Oracle jdk ? I'm still searching a fix anyway

@SkeLLLa
Copy link
Author

SkeLLLa commented Apr 24, 2013

No, I don't use openjdk. Only oracle jdk both win and linux 1.7/1.6 versions.

@RafalNiewinski
Copy link

Today I have the same problem. I am using Android Sudio also and Open JDK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants