HelloGoogleMaps : getting error instead of AlertDialog displa

by yodaa » Wed, 24 Feb 2010 23:23:19 GMT


Sponsored Links
 i,

I followed the Google Map View tutorial located at:
http://developer.android.com/resources/tutorials/views/hello-mapview.html

I'm running Eclipse Galileo (up to date) under Windows XP SP3.

The tutorial projet is runs within the emulator but clicking on one
of the drawable "androidmarker" positionned on the map leads to the
following Error message:

Sorry!
The applications HelloGoogleMaps (process com.tests) has stopped
unexpectedly. Please try again.

1 ) File :AndroidManifest.xml :
----------------------------------------------------
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.tests"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/
app_name">
<uses-library android:name="com.google.android.maps" />
<activity android:name=".HelloGoogleMaps"
android:label="@string/app_name"

android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category
android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-sdk android:minSdkVersion="7" />
</manifest>
2 ) File : res/layout/main.xml :
----------------------------------------------------
<?xml version="1.0" encoding="utf-8" ?>
<com.google.android.maps.MapView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="myapikey..." />

3 ) File : HelloGoogleMaps.java :
----------------------------------------------------
package com.tests;

import java.util.List;

import android.graphics.drawable.Drawable;
import android.os.Bundle;
import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.Overlay;
import com.google.android.maps.OverlayItem;

public class HelloGoogleMaps extends MapActivity
{
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
MapView mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
List<Overlay> mapOverlays = mapView.getOverlays();
Drawable drawable =
this.getResources().getDrawable(R.drawable.androidmarker);
HelloItemizedOverlay itemizedoverlay = new
HelloItemizedOverlay(drawable);
GeoPoint point = new GeoPoint(19240000,-99120000);
OverlayItem overlayitem = new OverlayItem(point, "Hola,
Mundo!", "I'm in Mexico City!");
itemizedoverlay.addOverlay(overlayitem);



HelloGoogleMaps : getting error instead of AlertDialog displa

by TreKing » Thu, 25 Feb 2010 05:15:59 GMT


 




What's the stack trace at the point of the exception? That's your best bet.

-------------------------------------------------------------------------------------------------
TreKing - Chicago transit tracking app for Android-powered devices
 http://sites.google.com/site/rezmobileapps/treking 

--


Sponsored Links


HelloGoogleMaps : getting error instead of AlertDialog displa

by yodaa » Sat, 27 Feb 2010 21:10:57 GMT


 hanks for your reply

I started the adb command line in the Windows XP shell:

C:\xxx\tools\adb logcat

and ran my "HelloGoogleMaps" project.The maps showed up within the
emulator with the androidmarker icon as ususal, I clicked on it and
encountered the error message mentionned earlier.

The log gave me the following "traces":

D/dalvikvm( 191): GC freed 875 objects / 121384 bytes in 214ms
D/AndroidRuntime( 191): Shutting down VM
W/dalvikvm( 191): threadid=3: thread exiting with uncaught exception
(group=0x4001b188)
E/AndroidRuntime( 191): Uncaught handler: thread main exiting due to
uncaught exception
D/dalvikvm( 191): GC freed 945 objects / 464808 bytes in 181ms
E/AndroidRuntime( 191): java.lang.NullPointerException
E/AndroidRuntime( 191): at
com.android.internal.app.AlertController
$AlertParams.<init>(AlertController.java:753)
E/AndroidRuntime( 191): at android.app.AlertDialog
$Builder.<init>(AlertDialog.java:273)
E/AndroidRuntime( 191): at
com.tests.HelloItemizedOverlay.onTap(HelloItemizedOverlay.java:45)
E/AndroidRuntime( 191): at
com.google.android.maps.ItemizedOverlay.onTap(ItemizedOverlay.java:
453)
E/AndroidRuntime( 191): at
com.google.android.maps.OverlayBundle.onTap(OverlayBundle.java:83)
E/AndroidRuntime( 191): at com.google.android.maps.MapView
$1.onSingleTapUp(MapView.java:346)
E/AndroidRuntime( 191): at
android.view.GestureDetector.onTouchEvent(GestureDetector.java:506)
E/AndroidRuntime( 191): at
com.google.android.maps.MapView.onTouchEvent(MapView.java:628)
E/AndroidRuntime( 191): at
android.view.View.dispatchTouchEvent(View.java:3709)
E/AndroidRuntime( 191): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:852)
E/AndroidRuntime( 191): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/AndroidRuntime( 191): at
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:884)
E/AndroidRuntime( 191): at
com.android.internal.policy.impl.PhoneWindow$
DecorView.superDispatchTouchEvent(PhoneWindow.java:1659)
E/AndroidRuntime( 191): at
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:
1107)
E/AndroidRuntime( 191): at
android.app.Activity.dispatchTouchEvent(Activity.java:2061)
E/AndroidRuntime( 191): at
com.android.internal.policy.impl.PhoneWindow$
DecorView.dispatchTouchEvent(PhoneWindow.java:1643)
E/AndroidRuntime( 191): at
android.view.ViewRoot.handleMessage(ViewRoot.java:1691)
E/AndroidRuntime( 191): at
android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 191): at android.os.Looper.loop(Looper.java:
123)
E/AndroidRuntime( 191): at
android.app.ActivityThread.main(ActivityThread.java:4363)
E/AndroidRuntime( 191): at
java.lang.reflect.Method.invokeNative(NativeMethod)
E/AndroidRuntime( 191): at
java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime( 191): at com.android.internal.os.ZygoteInit
$MethodAndArgsCaller.run(ZygoteInit.java:860)
E/AndroidRuntime( 191): at
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
E/AndroidRuntime( 191): at
dalvik.system.NativeStart.main(Native Method)
I/Process ( 57): Sending signal. PID: 191 SIG: 3
I/dalvikvm( 191): threadid=7: reacting to signal 3
I/dalvikvm( 191): Wrote stack trac



Other Threads

1. Android prebuilt toolchain does not work with busybox

Dear all:

I am a newbie in the Kernel land.  I would like to use the prebuilt
toolchain included in the Android release to build BUSYBOX.  I have
lots of compilation error, and I need help.

I understand that I could use CodeSourcery toolchain to build the
busybox, and create a rootfs for the kernel.

Do you think it makes sense to carry two different tool sets, and
switch it back and forward during the development?
Also, is it safe to do this if a new toolchain is being released?

I am a bit confused, and need help badly.
Neil

My target:
TARGET=ARM926EJ
Host=Linux Centos5


--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-kernel+unsubscr...@googlegroups.com
website: 

2. Syncing contacts with Gmail contacts group don't work properly

Contacts syncing with a particular group in Gmail contacts:

Issues
1. If we add a new contact on the device then syncs and keeps the
server version, that is, by removing the added contact.
2. If we delete a contact on the device, it removes contact even on
server. Basically as the mobile is slow with too many contacts, I
wanted to keep less on mobile but more on Gmail.However this is not
possible.


If I edit the existing contact, then it sometimes updates and
sometimes it isn't.

Thanks,
Raja
--~--~---------~--~----~------------~-------~--~----~

3. Can Dev Phone bought in US be used in India?

4. Gtalk client implememtation

5. Music player got crashed in android running on beagle

6. How often does gmail sync on the G1?

7. Is there any way to use the socket port lower than 1024 (eg. 223) in Android platform