Learning JAVA

by JonnySnip3r » Thu, 12 Mar 2009 10:18:44 GMT

Sponsored Links
 Hey guys was wondering if you could help me, im new to the JAVA
programming language just started in fact i have installed the

Eclipse Ganymede (latest)

i have installed all the android updates for eclipse but every time i
start a new android project to learn i keep getting a red cross at the
side of the package telling me there is an error :|

im a n00b and i have no idea hope someone can help me  i want to start
ASAP here is where the error is...

package com.android.hello.android.hello;

import android.app.Activity;
import android.os.Bundle;

public class android extends Activity {
    /** Called when the activity is first created. */
    public void onCreate(Bundle savedInstanceState) {


Learning JAVA

by Kather Jailani » Thu, 12 Mar 2009 10:23:01 GMT


Please try Europa. I had some compilation issues with Ganymede. Same code
compiles and works in Europa. (I might have done something wrong with
settings in Ganymede)


Sponsored Links

Learning JAVA

by Tommaso » Thu, 12 Mar 2009 16:36:42 GMT


I have Ganymede and it works just fine.
Make sure java is correctly installed, there are a lot of tutorials
Install the Eclipse Plugins for Android. How to do that is described
 http://developer.android.com/sdk/1.1_r1/installing.html under 
"Installing the ADT Plugin for Eclipse".

The red cross at the package means, if the red cross does not appear
in a deeper level of the package, that there is something wrong with
the preferences.
You can right click on the project and select "Properties", just at
the bottom.
You should check the settings for "Android" and Java.
My guess is that you didn't select an Android SDK.

Do you really mean package, or "Project"? Does the symbol appear at a
package icon or next to the project icon, which is an open folder in

Good luck,


Learning JAVA

by Mark Smith » Thu, 12 Mar 2009 16:43:50 GMT

 Hi Jonny,

I'm using Ganymede for Android development with no problems, so I
wouldn't try any other versions of Eclipse - it's probably your setup
that's wrong.

If you bring up the 'Problems' view, it should give you an indication
of what's actually wrong with your project. 'Window -> Show View ->
Problems'. Now click on the package icon that has the error - a
message should appear in the Problems window explaining what's wrong.



Learning JAVA

by wj chen » Fri, 13 Mar 2009 01:42:41 GMT


You might want to check if the ADT plug-in for Eclipse is in place.

Please refer to the installation guide for more detail:



Learning JAVA

by Oliver Dunkl » Fri, 13 Mar 2009 01:42:46 GMT

 * JonnySnip3r wrote on 11 Mar 2009:

Is the name of the class exactly the same name of the file? Because the
name of the file has to be exactly the same as the class.


The question of whether computers can think is just like the question
of whether submarines can swim. -- Edsger W. Dijkstra


Learning JAVA

by mark . kahrl » Fri, 13 Mar 2009 06:12:53 GMT

 It might be easier of you don't know Java to start by learning Java
and writing some usual desktop applications in awt/Swing. Look at  the
materials for the Java programmer certification to get a good overview
of Java. Once you've got a handle on Java  then try writing and
Android app. Just my 2 cents.


Learning JAVA

by RedMac G » Sat, 14 Mar 2009 02:09:53 GMT

 Me also uses Eclipse v3.4.1
Do not get step the version of yours back. It'll only confuse you without
solving any problem.



Other Threads

1. SoundPool bug

Hi all!
Here is my code:
    public static final int SOUND_CLICK = 1;
    public static final int SOUND_DEATH = 2;
    public static SoundPool soundPool;
    public static HashMap<Integer, Integer> soundPoolMap;
    soundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 100);
    soundPoolMap = new HashMap<Integer, Integer>();
    soundPoolMap.put(SOUND_CLICK, soundPool.load(Context, R.raw.click,
    soundPoolMap.put(SOUND_DEATH, soundPool.load(Context, R.raw.death,
    public static void playSound(int sound)
        AudioManager mgr = (AudioManager)Context.getSystemService
        int streamVolume = mgr.getStreamVolume
        soundPool.play(soundPoolMap.get(sound), streamVolume,
streamVolume, 1, 0, 1f);

After loading this sounds I'm waiting few seconds and than start
playing them. Usually all is fine, but sometimes one of this sounds
( even both ) just disappear.
What's the problem with it?

2. listview search

I have a listview with cursor adapter and i want to be able to search
in the list view. I implemented my own search : i implement
Tex{*filter*}cher interface and when the text is changed i make a new query
to the db to obtain a new cursor and than refresh the listview content
it works but it is too slow and its not the android way :). There is
also another way to implement Filtarable in the adapter for the
listview on than setTextFilterEnabled(true) but i think the
performance will be the same. So the question is what is the best way
to implement search for a listview and can i use the default search
( in contacts listview for example with the scrollbar that shows the
Thanks in advance.

3. How the views are refreshed with new language selection?

4. Changing a Back button press to Home button press

5. How to merge images?

6. Developing application in Android

7. can webkit to handle page redirect problem