Can't create new class in Eclipse (Google Map View official tutorial)

by yodaa » Sun, 31 Jan 2010 07:40:55 GMT


Sponsored Links
 Hi,

I'm running Eclipse IDE on Windows XP using Android SDK "up-to-
date" (and working fine...).
I'm doing the "Hello Views" tutorials series, and I've done the first
part of "Google Map View" tutorial :

 http://developer.android.com/resources/tutorials/views/hello-mapview.html 

I went succesfully through Part 1, and ran the application properly on
the emulator.

I discovered an issue when I started Part 2 of this tutorial. I tried
to create a new class in Eclipse using :

- right clic on my package > New Class
- Entered "HelloItemizedOverlay" in the Class Name field
- Within the Superclass field, entered
"com.google.android.maps.ItemizedOverlay"
- Clicked the checkbox for "Constructors from superclass"

The weird thing happens here : The finish button, even if active can't
be clicked....
I tried to create the Class several times and only the cancel button
is responding.

Maybe I've missed something here....
Help would be appreciated.

Thanks

--



Can't create new class in Eclipse (Google Map View official tutorial)

by Kitzy » Mon, 01 Feb 2010 22:45:37 GMT


 You need to be sure that you have given it a package name and sometime
you also have to select the project you're working in, even if you
only have one open project.

-Kitzy




--


Sponsored Links


Can't create new class in Eclipse (Google Map View official tutorial)

by yodaa » Mon, 08 Feb 2010 20:20:01 GMT


 Somehow I didn't answered post to the whole group on last reply...
(@Kitzy: anyway, thanks for your feedback...).

I ] Steps to encounter the issue within an Android Project in Eclipse
IDE (Map HelloMapView tutorial):

1.1 )  Right clic on my project folder
1.2 )  New > Class:
* Source folder: "MyProjectName/src" (filled by default)
* Package: "com.mypackagename" (either tried manually & using "browse"
feature)
* Enclosing type: leaved unchecked
* Name: "HelloItemizedOverlay"
* Modifiers: public
* Superclass: "com.google.android.maps.ItemizedOverlay"
* Interfaces: leaved blank
* Which method stubs would you like to create?
--> Constructor from superclass: checked
--> Inherited abstract methods: checked

And clic on the finish button doesn't do anything.

II ] Steps to encounter the issue within a regular Java test project:

2.1 ) Create new Java test project
2.2 )  Right clic on my test project folder
2.3 )  New > Class:

* Source folder: "MyTestProjectName/src" (filled by default)
* Package: "com.mytestpackagename" (either tried manually & using
"browse" feature)
* Enclosing type: leaved unchecked
* Name: "testJavaClassApp"
* Modifiers: public
* Superclass: "java.lang.Object"
* Interfaces: leaved blank
* Which method stubs would you like to create?
--> public static void main (String[] args): checked
--> Constructor from superclass: unchecked
--> Inherited abstract methods: checked

And clic on the finish button doesn't do anything: seems like my issue
is not specific to Android SDK (just hypothesis, of course).

Any feedback would be appreciated.
Thanks

--



Can't create new class in Eclipse (Google Map View official tutorial)

by Indicator Veritatis » Tue, 09 Feb 2010 03:16:06 GMT


 Your choice of package name is suspicious. It must match the package
name you used for HelloMapView. Did you use the same name? Was the
finish button grayed out just before you clicked on it?

Eclipse is buggy, but this does not sound like a familiar bug. You
should have got an error message if it had trouble reading your
project configuration to figure out where to put the new class, You
may want to search the Eclipse bug database.




--



Can't create new class in Eclipse (Google Map View official tutorial)

by yodaa » Tue, 09 Feb 2010 04:39:37 GMT


 Thanks for your response

There's no problem in the package name, the one I mentionned was an
example.
I used the same package name for HelloMapView class and other classes
in my android project (no big deal here)

I've finally  created the class manually, because I wouldn't able to
hit the "finish" button for the Create New Class Wizard in the IDE.
My project runs OK in the emulator...The "finish" button of the
"Create New Class"  Wizard is not greyed, that's why I can't figure
out how to resolve this issue.

I must mention that I'm running Eclipse under Windows XP





--



Can't create new class in Eclipse (Google Map View official tutorial)

by Indicator Veritatis » Tue, 09 Feb 2010 04:56:51 GMT


 s far as I can tell from your description, I went through the exact
same steps when I did the HelloGoogleMaps tutorial a few days ago, and
everything worked fine. The new file was created and placed right
where it should be when I clicked. The only differences I can see are
things that should have made no difference, i.e., the name was
HelloGoogleMaps, not HelloMapView, and I am running under Fedora11,
not WinXP.

Or is the different name the problem? The tutorial I did really was
http://developer.android.com/resources/tutorials/views/hello-mapview.html,
it really does want you to name things "HelloGoogleMaps", and NOT
"HelloMapView", even though the name of the tutorial is "Google Map
View".

Did you do http://developer.android.com/guide/tutorials/views/hello-mapview.html
instead? They are very similar.

But somehow, this does not sound likely, since you mentioned you get
the same error with a non Android project.

Oh, BTW: I am running Eclipse Galileo: I don't remember you giving the
version of Eclipse you are using.

On Feb 8, 12:39pm, yodaa <yodaa...@gmail.com> wrote:

--



Can't create new class in Eclipse (Google Map View official tutorial)

by yodaa » Wed, 10 Feb 2010 04:31:20 GMT


 Indicator Veritatis
You"re right about the tutorial name I've followed the tutorial called
"Google Map View":
http://developer.android.com/resources/tutorials/views/hello-mapview.html

There are some kown GUI issues under Linux (thanks @greg, I noticed
this on the eclipse bug database, I also use Fedora 12 as second OS,
but I haven't not tried yet to install my dev environment under
Fedora):
https://bugs.eclipse.org/bugs/show_bug.cgi?id=291257

I'm running Eclipse Eclipse Galileo under Windows XP, so the GUI bug
doesn't affect the Windows version.
I hope I would be able to resolve the issue without running through a
full re-installation of Eclipse and Google APIs / Android SDK!.

On 8 fv, 21:56, Indicator Veritatis <mej1...@yahoo.com> wrote:

--



Can't create new class in Eclipse (Google Map View official tutorial)

by GregBrannon » Wed, 10 Feb 2010 06:47:22 GMT


 orry.  I just reread your first post and saw that you're using
Windows. Bad reading the first time.

See if you can find a problem and solution similar to the one I
described running Eclipse in the Windows environment by Googling
variations of "Eclipse buttons don't work." I'm not aware of one, but
I don't use Windows. In the meantime, try using keyboard combinations
to activate the button. For example, Alt-F may be the keyboard
combination to activate that Finish button.

On Feb 8, 3:56pm, Indicator Veritatis <mej1...@yahoo.com> wrote:

--



Can't create new class in Eclipse (Google Map View official tutorial)

by GregBrannon » Wed, 10 Feb 2010 06:47:41 GMT


 You didn't say which OS you're running Eclipse on, but Eclipse has
known issue with responding to dialogue buttons on some Linux
distributions and X environments.  If this could apply to you, start
Eclipse from a script file that includes the command:

GDK_NATIVE_WINDOWS=true

Good luck!

--



Other Threads

1. Accessibility question

I have just started looking at android development.  I am blind and trying 
to figure out how to work with the emulator to test things.  Can anyone 
tell me how to get free-eyes to run in the emulator and preferably come up 
when the emulator starts?  I don't know if that will make anything more 
accessible but it is a place to start.


Tom

--

2. Compressing camera image to a certain size

Hello

I am sending images taken from the camera to a server. I want to keep
as high quality as possible but not exceed 1.5MB.

When data from camera is less than 1.5MB i do not process it, but
there are cases when data might be 3, 5 etc.

I have looked around in the BitmapFactory and Bitmap class. Basically
i need to Bitmap.compress with a dynamic quality parameter.

How can I determine which quality to use inorder to get an unknown
image data size to 1.5MB? Or is there an other way to handle this?

Thx for any pointers.

-- 

3. How to make a map move as you drive?

4. bitmap magnification

5. how do i add the content view behind gridview?

6. Optimizing TextView creation

7. How could I be interfering with context menu longclick?