So much problems with Eclipse developing for Android? - java

a million error per day using eclipse with the Android plug-in i tried everything uninstall plug-in ,eclipse,JDK,JRE and install them again and using different ver. also changes Workspaces , i thought the problem with the new Java and Eclipse but i solved it and still . what the alternative is there a way so it could be more stable is other IDE with Android Plugin is mature enough to use them instead of all the problem and headache that eclipse give me in my life .
Edit: i use Eclipse 3.5 and im running Win7 in 4 Gig of ram ,i read the info about the known bug with Eclipse and JDK 6 update 21 and try what they suggest but i think thats not the problem.
some of the problem that i had ,XML editor for Android also sometime the disable of the Auto-complete (i made new Workspaces now i have 10's of them ) and when i open the DDMS nothing appears even when i try to add the LogCat also alot of error msgs that prompt to me and close the IDE and sometime it just close by-itself .
Edit 2 : New Error it display to me "permGen space" ?!

What version of Eclipse are you using?
The ADT Plugin for Eclipse site warns about this:
Caution: There are known issues with
the ADT plugin running with Eclipse
3.6. Please stay on 3.5 until further notice.
Also, check your JDK to be the latest. If you are on Windows, there's a known bug with Eclipse and JDK 6 update 21. Check that you are using the latest version since Oracle fixed it.
Must add I've used Eclipse for Java Developers version 3.5 with the ADT plugin, and haven't had any of the mentioned problems so far.
EDIT: Could you be more specific with those errors?
XML editor for Android works fine with auto-complete in my case, so does the debugger. I've been able to debug applications correctly. Take in consideration when launching the emulator, it takes a few minutes for the emulated system to boot, launch your app, etc.
You should copy and paste the error messages that Eclipse displays, in order to have an idea of what is happening.
It could be a problem with the memory assigned to Eclipse, the JVM, or who knows what, but we need more detailed information in order to assist you.
EDIT 2: This is quite a common error in Eclipse. From Eclipse's Wiki:
If you see java.lang.OutOfMemoryError:
PermGen space errors, you need to
increase the permanent generation
space available to Eclipse.
PermGen is the permanent generation of
objects in the VM (Class names,
internalized strings, objects that
will never get garbage-collected). An
easy, if somewhat memory-hungry fix is
to enlarge the maximum space for these
objects by adding
eclipse [normal arguments] -vmargs -XX:PermSize=64M -XX:MaxPermSize=128M [more VM args]
The arguments after -vmargs are
directly passed to the VM. Run java -X
for the list of options your VM
accepts. Options starting with -X are
implementation-specific and may not be
applicable to all VMs.
You can also put the extra options in
eclipse.ini.
Check the link for further information, you can find common errors and bugs in the Eclipse and Sun VMs on Windows part.

I'm truly sorry for saying this, and I'll probably will be shot to death by it... but:
On every other development environment I've used in Python, Ruby on Rails, PHP <> MySQL, Java, and... all have been working best on Windows operating systems.
It was a surprise to me that Android really works best on Mac OS. Lets face it, I'm a Windows kind of guy, but for Android - Mac is your choice!
Sorry...

A million errors per day sounds like some component is severely broken. Is the Android plugin the right version for the Eclipse version you are using. There are many which are not yet ready for Eclipse 3.6

I did not have any problem getting the SDK up and running on ubuntu. Its free, the resources are great, and most of all its not windows. So linking libraries and stuff is not that big a headache. Also its much more light on your computer so you have all the power that your awesome pc has to test really heavy apps! Why don't you give it a shot? I bet you will not be disappointed. ;-)

Related

Libgdx could not determine java version 11.0.1

I tried everything I installed every possible Java file a million times I installed the newest gradle version but it continues to show this error. I'm on Mac. Please help thanks
IF you do not want to develop for Android Java 11 works fine libgdx.
You have to change some things before everything builds and runs.
Here's what I did to get my project working.
My context Mac OSX 10.14 and openJDK 11.0.2, new project, Desktop launcher and a bunch of Extensions (not important).
The error you get about not being able to find java 11.0.x comes from gradle. Java 11 is only supported since gradle 5. In order to use gradle 5 instead of 4.6 the generated project is configured with, go to <project-dir>/gradle/wrapper/gradle-wrapper.properties and change distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip into distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-all.zip.
That resolves the java 11 error just to confront you with a new error Could not get unknown property 'classesDir' for main classes of type org.gradle.api.internal.tasks.DefaultSourceSetOutput.
To get rid of that, open <project-dir>/desktop/build.gradle and change line 27 (might be different for you)
from files(sourceSets.main.output.classesDir) into
from files(sourceSets.main.output.classesDirs)
thats classesDir into classesDirs
This should resolve all build errors and you're good to go.
I am strongly recommend to use Java version not greater than 8. It is many incompatibility issues I faced just on 9 version of JDK in Android Dev environment.
Uninstall all java you have, use this article, because it is not as such easy without knowledge: https://www.java.com/en/download/help/mac_uninstall_java.xml
After download the 8th version from here: https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
I did same some time ago and all problems left

Java program is slower as a dist build than when ran from Netbeans

So I have this neat physics sim I made that, while running at certain settings, runs at around 34 fps when ran via the Netbeans "run" -command. Then I click "clean and build" and go open the program from the dist folder, and it runs at around 10 fps with the same setup.
Can it be about Java settings? I don't have any special setting done in Netbeans but I'm not sure how to check my the settings on the installed JRE, can they even be different by default from what Netbeans uses by default?
I doubt it's running a different JDK but you can check the JDK that your Netbeans installation is using at Tools -> Java Platforms. To check what version of Java is in use by the distributed version look at your JAVA_HOME, and Path environment variables.
A major difference between the distributed version and the development environment may be the libraries. Check your CLASSPATH environment variable, and compare the actual files between the distribution and development environment to see that the size and dates match. I'm not totally sure how to get at the CLASSPATH used by Netbeans but can advise that it has some special magic it uses based on the libraries included. Also be aware that the order of the included libraries may make a differen
What software are you using to deploy your project?
Ok problem solved, it was due to outdated Java. I did have my 32 bit Java updated already - the default download at oracle.com but the program was using the 64 bit version, which was actually way outdated. So installing the latest 64 bit release of Java solved it.

UI twitching and missing letters when using JRE 8

I am having a problem with my Java on my personal laptop. I have Java 8u11(JDK and JRE). I am working in Eclipse Kepler and making applications. Until now I was working on my office computer and I had no problems(I have Java v7u55 on the office one).
Starting yesterday after I created a small Swing-GUI program as a test in Eclipse and I ran it on my personal computer the program came up all weird and twisted with all the letters twitching or missing.
You can see more from the screenshot below.
Something like this:
The same thing happens with all my executable JAR files.
The button are not empty there is text in them:
I've tried re-installing Java and installing it again and it won't work. I have the Java added to my System Variables Path.
I think it is a problem with the JRE/JDK. Maybe downgrading the Java version I have installed ?
Restart of the computer didn't work. Any other ideas or solutions ?
This question can be closed as answered, as the solution from the question: Swing rendering appears broken in JDK 1.8, correct in JDK 1.7
helped in solving my issue.
I changed my 3D Settings in NVIDIA Control Panel to High-performance NVIDIA processor and was able to run my Java programs with JDK 8u11 without any problems.
Thanks :)

autocomplete is broken in Eclipse Latest May upgrade with JAva 6?

I have a PC right now which have installed Java in July 2011. When i run my latest download ADT it's work without anything required (I thing they take old installed Java).
Now My trouble is I never see autocomplete. After too many CTRL + Space I got autocomplete but never in Java files.
I found that their is AVD already crated for Android 1.6. Look like someone have used Android Eclipse on computer before.
I not want to know what have used in current PC. I just want to run my latest downloaded ADT which not have any kind of code completion when I work on Java files.
I have deleted the workspace folder and it's not useful. Do someone guide us what to do.
I hear in Another answer here (Raghav sood) that Android use Java 6. Do this means it will work. I thing it's about Android use Java 6's customized package not Java 6.
What I need to do now to make it work.
Just download this bundle:
http://developer.android.com/sdk/index.html
Or try the new Android Studio, which still on beta, released at Google I/O 2013:
http://developer.android.com/sdk/installing/studio.html
If I were in your shoes, I would download and install the latest version of Java, Eclipse and the ADT.
Of Course there could be an other solution, but in my opinion its the fastest way. And you get some bugs fixed with the new version. 2 Years are a long time in android development.
EDIT: Some advice: If you've installed all these things, just zip it so in case your eclipse is broken you've a fast backup.

Is it possible to build a Linux/Motif Eclipse RCP application?

I am trying to build an Eclipse application that would work with a linux/motif installation target. However, this seems not to be possible even though the export option is available in the product export wizard.
I've checked the content of the delta pack and indeed, the packages for linux/motif are missing. After checking the downloads page for eclipse 3.4 at:
http://download.eclipse.org/eclipse/downloads/drops/R-3.4-200806172000/index.php
I see that even though there is an Eclipse version marked for Linux/motif, it is marked as Testing only. Additionally, there is no delta pack for this target.
Has anyone been successful building an RCP application targeting linux/motif? Would it work if I download this testing only version of eclipse and copy the missing plugins?
We have a similar issue. We are building Eclipse applications and one of our platforms is Solaris 10 x86 which was supported for a short time as an early access build in 3.2 and dropped. I believe 3.2 and 3.3 supported motif so your best bet may be to revert to an older version of Eclipse. I develop in 3.4 and when we do the Solaris specific release we switch back to 3.2, it is usually about 10 minutes of changes to fix everything for the prior version. Usually it is removing #overides in a few locations and changing a function or two that Eclipse no longer uses.
The other thing you can do is get the Linux/Motif package for Eclipse, and install it on a Linux box running Motif. Check out your project on that Eclipse machine and export it there. I tried out VirtualBox (a free Virtual Machine from Sun Microsystems) it should make this easy for you.

Categories