By default, Eclipse compiles in the background as soon as you change/save a file.
To know if there was compilation errors you can: - look at the Package Explorer View. Any red marker on your project files will show an error. - look at the Problems View to see the actual problem description.
I'm guessing you have gcj installed instead (or alongside) the Sun JDK. Because of this, keytool (in /usr/bin) points to the gcj version which is incompatible.
Either uninstall gcj, or make sure keytool points to the Sun JDK version.
I found this slightly more complicated and this is what I did to
resolve it. This is specific to Ubuntu and I'm using 8.04.
If you are using Ubuntu and have used the package manager to download
and install Eclipse 3.2.2 (which is all that is available using Ubuntu
right now, much to the chagrin of those who use Eclipse...) you will
have GCJ version of Java Installed.
I removed Eclipse 3.2.2 and then downloaded and installed Eclipse
3.3.4. All of the packages, however, that were required by Eclipse
3.2.2 remain on the system. (Not all of that is bad, mind you, but you
have to jump through some additional hoops.)
You can back out of GCJ, for one, or you can use "update-alternatives"
to re-link the java tools.
Type:
sudo update-alternative --config java
You will be presented with a list of Java alternatives. If you have
installed Java 1.6.0, then look for that and hit the number next to
it.
Don't be fooled, you may have relinked Java, but you have not relinked
additional tools.
Type:
sudo update-alternative --config keytool
Then selected the appropriate Java keytool application. There may be
other things that may need to be relinked using this method, but those
two fixed my issue.
Next step, you may need to re-create the debug.keystore or make
another one for yourself using Java 1.6.0 keytool.
Java's keytool is a little different than GCJ. Type:
keytool -genkeypair
This will update the ".keystore" file in your home directory. I then
copied this to ".android/debug.keystore".
You can also go in to "Windows > Preferences > Android > Build" and
set the Custom debug keystore to your ~/.keystore file. I have both
filled in... just in case.
I still couldn't get it working because of the error flag on the build
process. I went into "Run > Run Configurations... " selected Android
Application and created a New_Configuration. Under the common tab, I
flipped it from Local File to Shared File, Ran the application (it
launched the emulator without an issue), then flipped it back to Local
file and saved it.
The .APK is now saved in the bin directory... now I just need to get
it to launch. :) Need to dive back into the documentation.
Man, I just want you all to know, this problem must be very obscure
with the signature file... because I couldn't find any real
information in one place. Hope this helps others...
I've been with this problem too and I tried to solve it using the tips
provided here but, as solution I've generated the .APK file using a
Batch file from the Android SDK tools folder.
I'm using windows. But probably, this batch file is a ShellScript file
on linux.
So here it is the command line I've used: C:\Arquivos de programas
\android-sdk-windows-1.0_r1\tools>apkbuilder.bat HelloAndroid.apk -rf
"C:\Documents and Settings\Filipe\workspace\HelloAndroid"
I hope it helps!
Filipe.
On 2 out, 23:37, "David Farler" <mag...@gmail.com> wrote:
> Elcman, why don't you just get sun-java6 and put eclipse 3.4 + ADT in your
> home folder? It might make things a little cleaner, would it not? Those guys
> really need to keep those packages up to date.
> Dave
> On Thu, Oct 2, 2008 at 2:50 PM, elcman <elc...@gmail.com> wrote:
> > I found this slightly more complicated and this is what I did to
> > resolve it. This is specific to Ubuntu and I'm using 8.04.
> > If you are using Ubuntu and have used the package manager to download
> > and install Eclipse 3.2.2 (which is all that is available using Ubuntu
> > right now, much to the chagrin of those who use Eclipse...) you will
> > have GCJ version of Java Installed.
> > I removed Eclipse 3.2.2 and then downloaded and installed Eclipse
> > 3.3.4. All of the packages, however, that were required by Eclipse
> > 3.2.2 remain on the system. (Not all of that is bad, mind you, but you
> > have to jump through some additional hoops.)
> > You can back out of GCJ, for one, or you can use "update-alternatives"
> > to re-link the java tools.
> > You will be presented with a list of Java alternatives. If you have
> > installed Java 1.6.0, then look for that and hit the number next to
> > it.
> > Don't be fooled, you may have relinked Java, but you have not relinked
> > additional tools.
> > Then selected the appropriate Java keytool application. There may be
> > other things that may need to be relinked using this method, but those
> > two fixed my issue.
> > Next step, you may need to re-create the debug.keystore or make
> > another one for yourself using Java 1.6.0 keytool.
> > Java's keytool is a little different than GCJ. Type:
> > keytool -genkeypair
> > This will update the ".keystore" file in your home directory. I then
> > copied this to ".android/debug.keystore".
> > You can also go in to "Windows > Preferences > Android > Build" and
> > set the Custom debug keystore to your ~/.keystore file. I have both
> > filled in... just in case.
> > I still couldn't get it working because of the error flag on the build
> > process. I went into "Run > Run Configurations... " selected Android
> > Application and created a New_Configuration. Under the common tab, I
> > flipped it from Local File to Shared File, Ran the application (it
> > launched the emulator without an issue), then flipped it back to Local
> > file and saved it.
> > The .APK is now saved in the bin directory... now I just need to get
> > it to launch. :) Need to dive back into the documentation.
> > Man, I just want you all to know, this problem must be very obscure
> > with the signature file... because I couldn't find any real
> > information in one place. Hope this helps others...
I also had the same problem when I tried upgrading to the new version.
The problem was that eclipse wasn't able to compile the program
because of the problem with the classpath in Java, that's why the apk
is not present. What I did was to execute CLEAN first in eclipse and I
saw the root of the problem.
What it does is execute keytool.exe which is inside the bin folder
under the JAVA_HOME classpath. However, the problem was, my JAVA_HOME
was set to C:\Program Files\Java\jre1.6.0_04\bin, and when eclipse try
to run it, it tried to run C:\Program Files\Java\jre1.6.0_04\bin\bin
\keytool.exe. Double "bin"!
So what I did was just change my JAVA_HOME variable to C:\Program Files
\Java\jre1.6.0_04 (without the bin) (Windows Control Panel->System-
>Environment Variable).
I don't know what eclipse or android did for the new version, since it
worked for me two months ago without any change in settings.
I hope this helps.
On Sep 25, 5:08 am, Kevin M <kevinmcom...@gmail.com> wrote:
> I also had the same problem when I tried upgrading to the new version.
> The problem was that eclipse wasn't able to compile the program
> because of the problem with the classpath in Java, that's why the apk
> is not present. What I did was to execute CLEAN first in eclipse and I
> saw the root of the problem.
> What it does is execute keytool.exe which is inside the bin folder
> under the JAVA_HOME classpath. However, the problem was, my JAVA_HOME
> was set to C:\Program Files\Java\jre1.6.0_04\bin, and when eclipse try
> to run it, it tried to run C:\Program Files\Java\jre1.6.0_04\bin\bin
> \keytool.exe. Double "bin"!
> So what I did was just change my JAVA_HOME variable to C:\Program Files
> \Java\jre1.6.0_04 (without the bin) (Windows Control Panel->System-
> >Environment Variable).
> I don't know what eclipse or android did for the new version, since it
> worked for me two months ago without any change in settings.
> I hope this helps.
> On Sep 25, 5:08 am, Kevin M <kevinmcom...@gmail.com> wrote:
> > I am getting this error when trying to run my programs... I see other
> > threads about this but none have clear answers.
> > I'm using Eclipse 3.4 on Ubuntu 8.04.
> > Any info you need me to post I will be happy to supply.
> I had this double bin problem too although my solution was different:
> I've copied the keytool.exe from the JDK folder to %windir%\system32
> folder.
> I did that because I also tried to change the JAVA_HOME classpath.
> However I was still with this problem.
> Filipe.
> On Oct 10, 7:51 am, ftbalagt <ftbal...@gmail.com> wrote:
> > Hi!
> > I also had the same problem when I tried upgrading to the new version.
> > The problem was that eclipse wasn't able to compile the program
> > because of the problem with the classpath in Java, that's why the apk
> > is not present. What I did was to execute CLEAN first in eclipse and I
> > saw the root of the problem.
> > What it does is execute keytool.exe which is inside the bin folder
> > under the JAVA_HOME classpath. However, the problem was, my JAVA_HOME
> > was set to C:\Program Files\Java\jre1.6.0_04\bin, and when eclipse try
> > to run it, it tried to run C:\Program Files\Java\jre1.6.0_04\bin\bin
> > \keytool.exe. Double "bin"!
> > So what I did was just change my JAVA_HOME variable to C:\Program Files
> > \Java\jre1.6.0_04 (without the bin) (Windows Control Panel->System-
> > >Environment Variable).
> > I don't know what eclipse or android did for the new version, since it
> > worked for me two months ago without any change in settings.
> > I hope this helps.
> > On Sep 25, 5:08 am, Kevin M <kevinmcom...@gmail.com> wrote:
> > > I am getting this error when trying to run my programs... I see other
> > > threads about this but none have clear answers.
> > > I'm using Eclipse 3.4 on Ubuntu 8.04.
> > > Any info you need me to post I will be happy to supply.