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
following...

android-sdk-windows-1.1_r1
apache-ant-1.7.1-bin
droiddraw-r1b11
jdk-6u12-windows-i586-p
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...

Code:
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. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
    }
}
Thanks

--~--~---------~--~----~------------~-------~--~----~



Learning JAVA

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


 HI,

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


 Hi,

I have Ganymede and it works just fine.
Make sure java is correctly installed, there are a lot of tutorials
around.
Install the Eclipse Plugins for Android. How to do that is described
on
 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
yellow/blue?

Good luck,
  Tommaso



--~--~---------~--~----~------------~-------~--~----~



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.

--Mark



--~--~---------~--~----~------------~-------~--~----~



Learning JAVA

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


 Hi:

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

Please refer to the installation guide for more detail:
 http://developer.android.com/sdk/1.1_r1/installing.html 


Thanks,
wjcs





--~--~---------~--~----~------------~-------~--~----~



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.

        odi

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

--~--~---------~--~----~------------~-------~--~----~



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.

cheers.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Text wrapping around image

Hi,

I know this has been brought up before, but I couldn't find a solution
yet.

I'd like to get the similar layout on an Activity as this html
fragment in a browser, basically making text wrapping around an image:

<img src="rainbow.gif" align="left">
bla bla bla bla bla
bla bla bla bla bla
bla bla bla bla bla

I tried the following but no luck yet:
 - None of the current layouts supports this.
 - a TextView and using Html.fromHTML, but that doesn't seem to
understand the "align" attribute -- No matter what "align" equals to,
it just places the image in the same line of the first line of text,
and never aligns multiple lines of text along side the image.  Styles
don't work either.
 - I looked up the doc of ImageSpan, but its verticalAlignment only
supports "bottom" and "baseline".  Should I use "baseline"?  I tried
it but seems no effect, maybe I'm missing something?
 - A hack: using two TextView, one to the right of the image, and
another below the image, and set the maxLines of the first TextView to
be approximately the height of the image.  But the problem is I
couldn't get the *last visible character* for the text.

 I don't want to use WebView since it seems to be too much overhead
for such a simple view.

Thanks.
--~--~---------~--~----~------------~-------~--~----~

2. going back without hitting back button

anyone able to tell me how i would progammatically go back a step in
the stack when say, for example, a user hits a button widget?
--~--~---------~--~----~------------~-------~--~----~

3. Find MAC address

4. AutoCompleteTextView and ArrayAdapter with async update

5. Update 1.6

6. Is it possible to invoke an external activity, such as a browser, from a custom suggestion provided by a custom suggestion provider

7. 1.6. update and Gps recive