I'm fairly new to Eclipse and I'm using Kepler with EGit right now but I ran into a problem every time I compile my Java application. I've searched this forum to find a solution for my problem but I am still very confused as to what I can do to fix it. The application worked flawlessly yesterday morning and it works fine on my project partner's laptop but after syncing the project with 4 new commits from my project partner today, I keep getting a Source not found error every time I try to run the application. I get a button saying Edit Source Lookup Path and when I click on it and expand the folders, I get something that looks like this:
There are a bunch of .jar files above what you see and maTKProject is the name of my project.
If anyone could give some insight on how to fix this problem, I would greatly appreciate it!
When running the application in debug mode make sure that there aren't any breakpoints that shouldn't be there. Go to Window -> Show View -> Breakpoints and remove as necessary!
Related
When i create a new project, and press run i get this error.
The fact is i do already have jdk verison of 15 and my previously created projects do open and run without any errors. Also, if i add org.gradle.java.home=C:/Program Files/Java/jdk-15.0.1 line to my gradle.properties file the app runs without error but this way just does not seems right way to do it.
I have tried to change the SDK version from the project structure like some other questions and answers but it did not worked either. As an additon to other problems i do not have the same project structure screen as they showed so.
I do not know what to do right now, i would be very grateful if you could help me.
You should delete .gradle folder under user name. Then again run your project.
change gradle to 4.1.0
and it will be run
So I have been using IntelliJ with Gradle perfectly fine for the past few days. I tried to create a second Gradle project in the same workspace and since, IntelliJ crashes when i open it. The start screen appears, the project opens then a few seconds later it just closes. There is a crash report that appears, which is attached.
I tried deleting the new project and just opening the old one but it made no difference. It seems to be happening permanently now. I even tried reinstalling IntelliJ but it had the same problem the moment I created a second project.
Does anyone know how to fix this? Thanks.
Log File
After having a look around and being very close to contacting support, I found a post (I cannot find where) that suggested these errors are to do with my JDK version. After following this tutorial, the problem was fixed. Hope this helps someone else with the same issues!
My Eclipse installation suddenly stopped showing import suggestions. If I type a class name that isn't in the current package, autocomplete works fine and shows the class, but after picking from the drop-down, the class name is highlighted as an error with the message "MyClass cannot be resolved to a variable". This error shows no Quick Fix suggestions. However, if I manually add the relevant import statement at the top of the file, the code compiles and runs fine.
I've checked my build path and everything appears to be in order -- and like I said, the code runs when I hand-jam the import statement -- but losing automatic importing is really slowing me down. Any idea what could have gone wrong? It worked fine last week!
ETA: Another note, if it helps: F3 still opens the class declaration, so Eclipse clearly knows what I "mean", even without the import statement.
Also also: Things that have not helped:
Clean all projects
Restarting Eclipse
Restart computer
Delete .metadata from workspace, re-import project
Start new Java project, re-link source folder, re-add dependencies (not using Maven, but that's not my choice)
Thanks for all the help, everybody, but this turns out to have been a case of a broken Eclipse install.
I still haven't figured out exactly how or what was broken, but I tried to make a new project with a single "Hello World" class. The New Class wizard errored out with "Creation of element failed" in the class org.eclipse.wst.jsdt.internal.core.dom.rewrite.ImportRewriteAnalyzer. Once I hit "internal errors" in Eclipse, I gave up and installed a fresh Eclipse from a new download.
With a new Eclipse, I got my Quick Fix suggestions back, as well as automatic imports. I guess in future I'll try reinstalling Eclipse before I go looking for solutions to obscure errors like this :-/
These kind of situations can occur if your workspace went into a bad state or eclipse was unable to properly save state during last exit of workspace.
Try Project > Clean and clean all projects and rebuild all. See if this helps.
Clean all your projects. Then update Eclipse. Then restart of Eclipse. Then restart your development PC.
This happens to me sometimes too, I follow these steps and the problem always goes away.
If none of the other answers works, one brute force suggestion which sometimes resolves weird issues like this would be:
Close your Eclipse
Delete the .metadata folder inside your Workspace folder
Restart Eclipse
Note: This way you're going to lose all your workspace configuration. I advise you to backup it first in case it doesn't works.
I was working just fine on my JavaFX project till I installed netbeans-7.4beta-windows this morning. I then uninstalled it and tried to revert back to netbeans-7.2.1-ml-windows since 7.4beta was showing me code errors I wasn't getting with 7.2.1.
Now, unfortunately, when I try to run my project, I very sadly get the following pop-up error:
UnsatisfiedLinkError:
com.sun.deploy.config.WinPlatformUserHome()Ljava/lang/String;
When I click on "OK" my project window shows, but with nothing but a white window: no borders, just nothing. Not even the text and forms I coded in.
What could be the problem. Will trully appreciate any help.
It seems this has something to do with the way JavaFX builds projects. If you look at the bug report here, it discusses the same problem that you maybe having.
Try creating a new project, move all the files over to the new project and run it.
Have you tried refreshing your current project?
I agree with Little Child. However, I have had the same problem in the past. Create a new Netbeans project (or javafx project), transfer all the class files on to it, delete the original. Build the new project and it should work!
Conversion to Dalvik format failed: Unable to execute dex:
wrapper was not properly loaded first
[project]
Android Packaging Problem
I've never worked with Java or eclipse before, I'm following this introductory guide and all searches via google return no helpful results. I'm guessing the problem is I have built Android stuff with eclipse properly but I have no idea, I followed this guide to the letter and everything went as it explains it should.
Any ideas what caused this problem, or is it specific to the guide? If so I'll post on their help page.
I have tried doing project -> source -> clean up, but that didn't fix anything.
Edit:
I went to Project -> Android tools -> Dex bytecode and it reported:
DexDump: missing classex.dex for project. Please compile first.
So I guess that's my problem! Not sure how to solve though.
Go to Project -> Clean
It will rebuilt workspace and fix the errors if any.
As I said, I had the same problem so I tried all the different versions and
then I stopped filling in the SDK-version number
and finally it did not complain anymore about the wrapper.
After that it was totally fine to write the SDK-version when I created new projects.
Hope it works out for you too.
Had the same problem (running on Windows 7). I resolved it by running Eclipse with Administrator privileges.
try to run eclipse under administrator permission. Problem may be resolve.
I think you installed the SDK in "Program Files" folder . So for do something inside, must have administrator permission.
One thing that may help is to create a new test Android project.
In Eclipse, select File → New → Android Project.
Set the project name to "Test3", check Android 2.3 for the build target, type "com.example.android.apps.test3" for the package name, and type "Test3Activity" in the "Create Activity:" text box. The form should look like:
Click Finish.
Expand the entry for "Test3" in the Package Explorer. Navigate to res/values/strings.xml. Double click on the entry for strings.xml:
Set the text content of the string element having name "app_name" to "Test3":
Right click on "Test3" in the Package Explorer and select Run As → Android Application. The emulator should open and after a long while, you should see:
If these steps do not work, then you probably have an error in your installation.
Try it out and let me know.
I had the same problem earlier today. Google was largely unhelpful.
I fixed it by removing the project from eclipse, then re-importing it.
According to this bug report the problem is caused by upgrading to version 9 of the SDK.
Had the same HelloWorld problem with Ubuntu 64 Lucid / Eclipse 3.5.2 from Ubuntu repository. Restarting Eclipse did the trick, though I notice it still fusses about API level requirement when HelloWorld is run.
Running it as Administrator has solved this issue for me..
Had the same problem - occurred after I tried downloading Android platform v2.3.3 (was using 3.1 and 3.2 earlier) and it interrupted in the middle - restarted eclipse and cleaned all projects and rebuilt and the problem went away
At what point in this tutorial/guide are you running into this problem and did you make sure to include your package information in each file or ie com.something.somethingelse at the top of your class or classes?
Perhaps a registry error or maybe even a problem with activity implementation.
Please post your code if this did not start you in the right direction.
Here are a few things to check:
Make sure you have the latest version oF Eclipse (Helios)
Make sure that you have the Android SDK plug-in for Eclipse.
Now if you have done that... Make sure that any classes you add (Each screen you view on Android is a class and is called an Activity) are in your androidmanifext.xml file See http://wrenbjor.com/2011/01/12/the-androidmanifest-xml-file/ for help on understanding this process.
otherwise make sure there are no red x's in your code or it wont work.
If you still have problems post some code and we can try to help.
Had the exact same problem the other night. Upgraded to Helios (3.6) and it went away, quite possibly as a side-effect.
Under windows 7, rather than run eclipse as an admin, change the permissions on the eclipse folder so the creator/owner has full control, and do the same with the folder the android SDK is installed into.
I had installed Eclipse using the files provided by Windows' native ZIP extractor. I deleted the files and took them from 7-Zip instead. Now the error is gone. So maybe using another ZIP extraction tool will help.
Recently got this when failing upgrade using adb-manager with eclipse open (win32). As eclipse was open, upgrade failed. Then returning to my project this problem occured.
Was solved by closing eclipse, restart as administrator and cleaned project.
I had the same problem but I resolved it using following steps(using eclipse helios and windows XP ) :-
Right click on eclipse.exe.
click on Run As...
Uncheck the checkbox before "protect my computer from unauthorized activity".
And it is running for me as expected !
hope it will also run for you.