Why "MapActivity" will be error?

302 views
Skip to first unread message

Sky Turtle

unread,
Apr 22, 2012, 4:43:53 AM4/22/12
to andro...@googlegroups.com

I am using the TF201 of ASUS.
Why "MapActivity" will be error?
Please tell me.

package com.mycompany.myapp;
import android.os.Bundle;
import com.google.android.maps.*;
public class MapSample extends MapActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
MapView map = new MapView(this, "xxxxxxxxxxxxxxxx");
map.setEnabled(true);
map.setClickable(true);
setContentView(map);
}
@Override
protected boolean isRouteDisplayed() {
return false;
}
}

Hans Kratz

unread,
Apr 25, 2012, 9:47:07 AM4/25/12
to andro...@googlegroups.com
Projects using the Google APIs Add-On (e.g. for apps showing a Google
Maps MapView) are not yet supported. It is on our TODO list.

--
Hans Kratz
AIDE Team

Rory

unread,
Apr 28, 2012, 5:59:25 AM4/28/12
to AIDE - Android Java IDE
I would also like this feature.

Paul Peavyhouse

unread,
May 7, 2012, 10:29:39 PM5/7/12
to AIDE - Android Java IDE
Me too!
Can't we just add the google apis library to the project?

Pv

Travis Smith

unread,
Jun 6, 2012, 5:12:28 PM6/6/12
to AIDE - Android Java IDE
I've kind of forced a solution to this.

Menu->Settings->Compiler-> android.jar file

I dug around until I found the com/google/android/maps folder (with
it's classes). I then copied the android.jar that came with AIDE and
placed the directories/classes in a copy of that jar file. I pointed
the compiler to my new jar file, and it doesn't have any compiling
issues now. I still need to register for the API so I can put a map
view in, but I think this works.

Paul Peavyhouse

unread,
Aug 6, 2012, 5:22:25 PM8/6/12
to andro...@googlegroups.com, travis...@perfectsearchcorp.com
Apparently this is doable, per:

"It already works! Copy the .jar files from you android-sdk/add-ons/addon-google_apis-google_inc_-15/libs into your project/libs, and add the following lines to your .classpath:
Code:
	<classpathentry kind="lib" path="libs/effects.jar"/>
	<classpathentry kind="lib" path="libs/maps.jar"/>
	<classpathentry kind="lib" path="libs/usb.jar"/>
I still got a problem with loading of maps, but you won't see any errors, even compiling and running the .apk works."

Pv

FredT4

unread,
Feb 10, 2014, 9:30:09 PM2/10/14
to andro...@googlegroups.com
Did it work?
Reply all
Reply to author
Forward
0 new messages