Google Map View Error when running - Droid
I want to learn some programming for my android phone. I was successful doing the hello world app. Now I wanted to try the mapview found here: http://developer.android.com/resources/tutorials/views/hello-mapview.html
My code is the following:
package com.example.hellomapview;
import android.os.Bundle;
import android.widget.LinearLayout;
import android.widget.ZoomControls;
import com.google.android.maps.*;
public class HelloMapView extends MapActivity {
/** Called when the activity is first created. */
LinearLayout linearLayout;
MapView mapView;
ZoomControls mZoom;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
linearLayout = (LinearLayout) findViewById(R.id.zoomview);
mapView = (MapView) findViewById(R.id.mapview);
mZoom = (ZoomControls) mapView.getZoomControls();
linearLayout.addView(mZoom);
setContentView(R.layout.main);
}
protected boolean isRouteDisplayed() { return false;}
}
I'm using eclipse and I have the SDK and AVD all installed correctly but as soon as I do a run->run in eclipse it starts off ok with:
[2010-01-15 12:27:03 - HelloMapView]New emulator found: emulator-5554
[2010-01-15 12:27:03 - HelloMapView]Waiting for HOME ('android.process.acore') to be launched...
[2010-01-15 12:27:46 - HelloMapView]HOME is up on device 'emulator-5554'
[2010-01-15 12:27:46 - HelloMapView]Uploading HelloMapView.apk onto device 'emulator-5554'
[2010-01-15 12:27:46 - HelloMapView]Installing HelloMapView.apk...
The emulator comes up and I see my droid phone ready to load the HelloMapView app..but then it dies with the following:
[2010-01-15 12:27:51 - HelloMapView]Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2010-01-15 12:27:51 - HelloMapView]Please check logcat output for more details.
[2010-01-15 12:27:52 - HelloMapView]Launch canceled!
I've never done any android type development and I come from a C# background so my java is iffy...but does anyone see anything that I might be missing?
Asked by: Elian819 | Posted: 25-01-2022
Answer 1
My guess is that you've created an emulator that doesn't include the Google APIs.
If you launch tools/android
you'll see in available packages that there's e.g. "SDK Platform Android 1.5, API 3" and "Google APIs by Google Inc. Android API 3".
You need to install the Google APIs package, and use that one when creating a virtual device if you want to use maps.
Answered by: Melissa898 | Posted: 26-02-2022Similar questions
java - error running google maps api v2
I'm using google play services r14 and couldn't able to run the app on any device.
01-23 12:07:37.309: E/AndroidRuntime(7056): FATAL EXCEPTION: main
01-23 12:07:37.309: E/AndroidRuntime(7056): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mapstest/com.example.mapstest.MainActivity}: java.lang.NullPointerException
01-23 12:07:37.309: E/AndroidRuntime(7056): at android...
android - Error running Google Voice API code
With my basic knowledge on Android, I'm trying to play with the Google voice APIs and followed the example here and to write an app, which would allow me to call a hardcoded number. Unfortunately i'm getting an error saying < identifier > expected, so i'm unable to check if my app even works. Can someone se...
android google maps app running on galaxy s, but not on galaxy tab - getting grey tiles
i have developed an android application using google maps. when i deploy the application to a samsung galaxy s handset (runnning on Android 2.1) and also on other handsets running on Android 2.1 everything works fine.
when i change my project to support Android 2.2 i can still deploy the application to the galaxy tablet (running on Android 2.2). all functionality works there like on the galaxy s (Android 2.1) except the m...
android - Google Maps not running in mobile
I want to implement google maps in my application. I did the procedure for implementing Google Maps in application such as getting API key and run in Google API emulator etc. It's running fine in Google API Emulator.
Now I want to implement this Google Maps in my application which is in Android2.1. I am not able to do. If I run this Google Maps application in Android mobile which is in android2.1 it's showing error...
android - Audio focus on my app when tv is running in google tv
I need my app to get the audio focus when tv is ruuing a channel and my app is launched and loose focus when it goes to background. I tried it but not working in google tv.
I tried mAudioManager.requestAudioFocus(this,AudioManager.STREAM_MUSIC,AudioManager.AUDIOFOCUS_GAIN);
It working in device.i.e music stopped as app launched. but not worked in google tv with any parameters.
Steps for audio focus are:
1.In MainAp...
Tell if running AOSP or Google Android?
I've searched and cannot find this, though mainly a challenge of knowing what to search for, I'm sure it's been asked before.
How does an app deduce whether it is running on a "Google Android" device, or an AOSP device (e.g. Kindle Fire etc)?
Android: How to get google map running?
I have the following:
Map Activity Class
Map Activity Class LAYOUT
Manifest configuration snippet
google api - Android map v2 not running after some months
I just developed Android map using map v2, api key was activated in Jul 16 of this year. Map was working fine, but now from the start of this month map is not showing anything,
Another api key for map v2 for test project was created on Aug of this year and thats not working too.
Last time when i exported the APk, map was running fine but now same apk not showing map.
I didn't read anything about expiratio...
java - error running google maps api v2
I'm using google play services r14 and couldn't able to run the app on any device.
01-23 12:07:37.309: E/AndroidRuntime(7056): FATAL EXCEPTION: main
01-23 12:07:37.309: E/AndroidRuntime(7056): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.mapstest/com.example.mapstest.MainActivity}: java.lang.NullPointerException
01-23 12:07:37.309: E/AndroidRuntime(7056): at android...
Android Google Maps V2 Running issue
I am Working on Google Map. But When i run my code so it saying..
Couldn't handle android.intent.action.PACKAGE_CHANGED intent due to
initialization failure.
I can't understand this problem, what should I do?
android - Google map is not running even if everything is right
i am trying to implement a Google map in my android app.Following is my code:
private GoogleMap googleMap;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.connect);
initilizeMap();
googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);
googleMap.setMyLocationEnabled(true);
googleMap.getUiSettings().setZoomControlsEnabl...
android - Running Google Maps API Search Query
I'm making an app that'll let someone look up for a doctor nearby(registered on Google maps) when they select the Locate option from the navigation drawer.
I've got the fragment with the google map inside it and have initialised it to currently load a particular latitude and longitude and added a Location button to point to user's current location.
However, what I'd like to do is when someone selects the "L...
When Running android app I get ADB error
When i running Android App i got following error..
[2010-03-27 02:47:28 - HelloAndroid] Connection with adb was interrupted.
[2010-03-27 02:47:28 - HelloAndroid] 0 attempts have been made to reconnect.
[2010-03-27 02:47:28 - HelloAndroid] You may want to manually restart adb from the Devices view.
How can i fix this ?
Thanks
Atul Yadav
Running android unit tests from the command line?
I'm trying to run unit tests on the android platform in accordance with tutorial. Say, for example, I want to run tests for Email application. I open /apps/Email/tests/AndroidManifest.xml file, look for the <manifest> element, and look at the package attribute, which is co...
How to bind to running android service?
I'm hoping this is more of an issue with code than anything else and I'm hoping that someone out there can help track down the issue.
I have other code that starts the service with startService() and I can verify that the service is started as the debugger hits the onCreate() function of DecoderService.
However, the bindService never binds to the running service. Is this an asynchronous call and I have to ...
running android source from git tree
I just downloaded the most recent camera app on the cupcake branch of the android source tree, mostly in order to find examples to steal from in order to control the camera in my own application. It got the source from here. However, when I opened up the extracted folder as a new androi...
How to keep running my android app when phone goes standby?
Hi i'm programming an app that reads sensors values, and I need that it continue saving data while the phone goes standby (the screen go black after 1 minute). Any idea?
java - How do I get data from a running service
I have just started using services in Android and I have a made a simple service that is polling a server every 20 seconds.
Now how can I get this data from my main activity (when it is active)?
Alternatively the service could send it back do my main activity (but only if its active). I don't want to wake up my activity.
I have read SDK
Android 2.2 app on HTC Hero running Android 1.5
I have an application developed using Android 2.2 SDK. Can i port it on HTC Hero running Android 1.5?
Thanks
Dheepak
Running android app in Eclipse
I am new in Android.
I have downloaded Eclipse 3.4 and integrate with ADT and Android SDK r06.
My problem is that My Simulator is not working, it opens properly but the screen shows only "ANDROID.."
What should I do?
Please help.
android - Error: when i tried to run running project with 2.2 then it gives error
I build and run my project with 1.5 SDK
But when I tried to run my project after installing 2.2. I get this error.
Please help; what does this Error mean ? And how do I solve it ?
W/ResourceType( 2680): Bad string block: string #8 extends to 1575, past end at 60
W/ResourceType( 2680): Bad string block: string #7 extends to 2075, past end at 60
W/ResourceType( 2680): Bad string block: string #6 extends to 13...
Android Timer stops running
I have a class that is essentially a message manager (a singleton) that has a timer that polls for status. (statusPollerTask is just a derived class of TimerTask that has the run() defined)
timer.scheduleAtFixedRate(this.statusPollerTask, 0, 1000);
Several Activities register themselves with the msg-man for updates (observer pattern style) as they become visible. Works fine, except if the...
Still can't find your answer? Check out these communities...
Android Google Support | Android Community | Android Community (Facebook) | Dev.io Android