Unable to build community eddition master branch
hi, I'm trying to build the most recent master branch of community edition but I have problems. When I try to build inside intellij I get errors like these:
Error:(20, 22) java: D:\intellij-community\android\tools-base\device_validator\dvlib\src\main\java\com\android\dvlib\DeviceSchema.java:20: cannot access com.android.io.NonClosingInputStream
bad class file: D:\intellij-community\out\production\common\com\android\io\NonClosingInputStream.class
class file has wrong version 52.0, should be 50.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
Error:(21, 26) java: D:\intellij-community\android\tools-base\build-system\builder-test-api\src\main\java\com\android\builder\testing\api\DeviceConnector.java:21: cannot access com.android.ddmlib.IDevice
bad class file: D:\intellij-community\out\production\ddmlib\com\android\ddmlib\IDevice.class
class file has wrong version 52.0, should be 50.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
Error:(19, 25) java: D:\intellij-community\android\tools-base\perflib\src\main\java\com\android\tools\perflib\vmtrace\VmTraceData.java:19: cannot access com.android.utils.SparseArray
bad class file: D:\intellij-community\out\production\common\com\android\utils\SparseArray.class
class file has wrong version 52.0, should be 50.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
Some of the modules inside android part are built with JDK 1.6 and some are built with Java 8.
If I try to lower the version of some of the modules suddenly they stop compile because they use some Java 7 language features.
Also I noticed same problem in intellij code to:
Error:(18, 17) java: D:\intellij-community\platform\util\src\com\intellij\util\ui\IsRetina.java:18: cannot access apple.awt.CImage
bad class file: apple\awt\CImage.class(apple\awt:CImage.class)
class file has wrong version 52.0, should be 50.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
Any idea why is this version mismatch?
Please sign in to leave a comment.
I've pushed fix for this problem. Until it's published to GitHub repository you can disable 'Use compiler from module target JDK' option in File | Settings | Build, Execution, Deployment | Compiler | Java Compiler yourself.
Hello,
I'm also having issues building since I've upgraded to IntelliJ IDEA 2016.3.1.
My version:
The build error is on class com.intellij.lang.properties.PropertiesImplUtil:
Besides upgrading, I'm working on a newly cloned repository...
The class has no changes since early November (and I pull often); Am I missing some configuration?
Regards,
Sérgio Ribeiro
Porto - Portugal
Sergio,
it seems to be a different problem. Most probably it's caused by a bug in javac. Which version of JDK you set in 'Project Structure' as '1.8' JDK?
Hi Nikolay,
Yes, it's definitely a different problem, I've reused this thread because it had the title as I was going to create :-)
For "1.8", I was using "jdk1.8.0_66". Today I've tried using "jdk1.8.0_73" but it had the same result: it signals the same error in the same place.
I've also tried to compile using command-line ant, again with the same result :-(
I'm almost certain that it's some configuration that I'm doing wrong but I can't see it.
Sérgio Ribeiro
Porto - Portugal.
Hi Sergio,
the both 1.8.0_66 and 1.8.0_73 versions have bug in javac which causes these compilation errors. The bug was fixed in builds around 90, but it would be better to simply upgrade to the latest version of 1.8 (1.8.0_111).
Thank you Nikolay,
I'll upgrade my java and will let you know.
Sérgio Ribeiro
Porto - Portugal.
Nikolay, that was it.
I've upgraded my JDK to the latest and it compiled correctly.
Don't know how I've managed to compile until now 8-|
Regards,
Sérgio Ribeiro
Porto - Portugal