I am suddenly getting this error from eclipse when compiling.
Internal compiler error: java.lang.NullPointerException at
org.eclipse.jdt.internal.compiler.apt.dispatch.AnnotationDiscoveryVisitor.visit(AnnotationDiscoveryVisitor.java:61)
The project is an android project. Any clues? Don't want to do another eclipse reinstall! Help!
Little late, but I had the same problem and also tried to find solution. Maybe it will help someone in the future:
The problem is that Eclipce is unable to compile files and it throws an exception. In my case the fix was:
Move for now all compiled sources (buildBin folders)
Move for now all custom builders (.externalToolBuilders) if you have ones, and all .settings folder
Restart Eclipse and let it build
Fix compilation problems :)
Paste back all previously removed files (to not loose any settings\builders)
Related
When running my LibGDX desktop project I sometimes get this error:
Changes are not tracked, unable determine incremental changes.
I've tried using Java 8 and 17. I'm using Gradle 7.4.2.
I've tried the changes mentioned here but they seem to be for a Kotlin project.
I'm struggling to find any more info on what is causing this.
What else can I try to resolve this?
This problem occurred for me because my project files were located within a OneDrive folder. To solve this issue; I right-clicked on my project folder and selected "Always keep on this device".
--EDIT, 8/12/2022--
Longer term I've found actually that it didn't fully work and I ended up abandoning trying to keep it on OneDrive.
I also received this error message after successfully building the project a few times. "Build / Clean Project" solved.
I was able to fix my error by going to File and clicking Reload all from Disk.
I had the same problem and it would not let me just clean the gradle. I solved it by deleting my /android folder and running the build command afresh.
I had the same problem but the main reason that message shows up its because you have to save all your changes. Sometimes i forgot to save all changes and when rebuilding or rerunning that message appears to me too. That solves, in my case, the problem.
I also get this issue in WSL ubuntu, it was caused by some files in sources are not readable (permissions 000), change them to 644 then build ok.
I had this issue and tried everything on this thread without success. Android Studio tells to try to build with --info to try and catch the problem, I tried and it turns out I had copied an invisible file (0 kb) to the assets and that broke the build.
My answer is not very helpful as is but it may steer the person who reads this in the right direction.
The issue on my PC was that Windows defender detected a project build file as a threat.
You can either deal with the threat in the code or, if you trust that code you can ignore that threat in the antivirus software.
Can anyone explain to me the cause of this error? I know what is dexpath and dex class in android and how to fix this error. but don't know what is the cause of this error popping up every now and then.
This error occurs when
I transfer my project from one pc/laptop to another pc/laptop.
Whenever I've updated my android Studio lets say from AS 2 to AS 3 canary or stable release.
Uninstall and reinstall the Android studio and try opeining the Project again.
How I'm Fixing it:
Just remove all the dependencies and everything related to DEX Class file from gradle and sync it and then revert back to gradle settings with all the DEX file and dependencies added and Sync again. VOILAAA ..
And this is really annoying. How I can avoid this issue for my other projects without going through all this gradle sync tweak.
I had the same issue with moving projects to different system. when you move your project folder just leave out the build folder and you'll not see the error next time.
The error says a lot more then just class not found exception in the log. The path of the files/ app-parts.apk gets invalid when you move your project to a different system.
Just don't copy or just rename the old build folder to something else and open your project in AS. Build->CLEAN , BUILD->REBUILD and everything will work.
Happy Coding..
One day I opened eclipse and randomly got this "(x) Cannot be resolved to a type" (x could be, for example "String"). This happens on all my existing projects, and all projects I create. I cleaned all projects, restarted eclipse, and restarted my computer, all to no avail. What could be the cause and how can i fix it? Please provide an explanation as to what the cause is. Thank you.
This can happen when you change Java version from the build path.
You could try this.
Check Java version, change it if it's not what it's supposed to be.
restart eclipse.
All errors should automatically go.
I get this error during compile-time of my GWT project, there is no such folder as 'gwt-UnitCache' to delete, as suggested in the following questions
Weird GWT compile error
exception in GWT RPC app
I'm using IntelliJ IDEA (IDE), SmartGWT EE (Framework), JBoss AS (Server) and JPA
Here's the error log:
If you change the value of your <module rename-to='<appname>'> in .gwt.xml it will give the same error :) but then you can just delete your gwt-unitCache and all is ok :)
IntelliJ IDEA stores GWT cache files in other location than <ProjectFolder>/gwt-unitCache, which is a default directory for a cache if you are using, for example, Eclipse with GPE (Google Plugin for Eclipse).
In IDEA, GWT cache should be located by default at <your_home>/.IntelliJIdea12/system/gwt (IntelliJ IDEA 12, Linux). For other operating systems you can check Project and IDE Settings.
If you delete mentioned gwt folder contents, IntelliJ will create a new cache, which in turn might solve your Failure in unit cache... (and similar Unable to read from byte cache) problem.
I had the same problem with Eclipse.
Unfortunately looks like the only solution is the one given by Crowlix.
I tried to delete gwtCache and Temp files, but nothing worked.
The problem only got fixed when deleting the entire project and re-importing it.
I was able to fix it by systematically removing, compiling and re-adding every artifact piece.
If you're having this problem, make sure you have a structure like this:
lib contains your compile-time libraries
I am face off this same error, this tip doesn't works for me, moreover, I keep about looking for a solution, and finally, I got this advice:
Java stack overflow error
I tried with -Xss1m, but the error persists, I keep on trying, my final value was -Xss5m
I am using GWT 2.5.1 and IntelliJ 12.
I've got same problem building a project with maven.
Usign both suggestion of Nishant and #iVieL:
$ export MAVEN_OPTS="-Xms512m -Xmx1024m -Xss32m"
$ mvn clean package
you must clean your project first (Project -> Clean)
then remove /gwt-unitCache
then rebuild it.
I've run accorss a really weird issue, in eclipse I've got a codebase I've been working on for a couple of weeks and it's working fine. I did an svn update and all of a sudden one of my classes doesn't compile because it can't resolve an enum which is in the same namespace to a type.
I've checked the Java version and I'm running under Java 6 so enums should be supported.
Also it worked up till yesterday and now it doesn't.
Has anyone else seen this kind of behaviour? I've reloaded eclipse but beyond that I dont know where to start diagnosing it.
If it does say "Step cannot be resolved to a type", just try and clean the project (Project -> Clean). Eclipse gets confused sometimes, and a clean usually helps.
I had this recently. Turned out that someone had committed some jars that conflicted (had a previous build in) and put on the build path. Check recent commits to see if that's the problem, or to see what could have caused it.
However I would definitely do a build clean first within Eclipse, and see if ANT/Maven is affected (you do have such build scripts I assume).
Weird idea, but could it be that eclipse is trying to compile your class using a 1.4.2 compiler and isn't recognizing the enum?
I unloaded the project and reloaded it and it just works... No idea what the origianl issue was...