Go Back   Android Forums > Android Discussion > Android Applications

Android Applications All the information you could ever want about Android Applications. Find apps, learn about new apps, get helps with apps.. all here!



Reply
 
LinkBack Thread Tools
Old January 17th, 2010, 05:17 PM   #1 (permalink)
New Member
 
Join Date: Jan 2010
Posts: 1
 
Device(s):
Thanks: 0
Thanked 0 Times in 0 Posts
Default Android MapView Tutorial

Hey Everybody,

I'm been trying to get to grips with Android and have been writing some simple apps and working through the tutorials.

I'm having trouble with the MapView tutorial, lets start with the code which is:

package
com.splashapps.maps;

import
com.google.android.maps.*;

import
android.os.*;

public
class MapTest extends MapActivity {

@Override

protectedvoid onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);

setContentView(R.layout.
main);
}

@Override

protectedboolean isRouteDisplayed() {
returnfalse;
}

}

The manifest is:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.splashapps.maps"
android:versionCode="1"
android:versionName="1.0">
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name="MapTest"
android:icon="@drawable/icon"
android:launchMode="standard"
android:screenOrientation="unspecified">
<intent-filter>
<action android:name="android.intent.action.MAIN"></action>
<category android:name="android.intent.category.LAUNCHER"></category>
</intent-filter>
</activity>
<uses-library android:name="com.google.android.maps"/>
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-sdk android:minSdkVersion="3" />
</manifest>

The layout is:

<?
xmlversion="1.0"encoding="utf-8"?>

<
RelativeLayoutandroid:id="@+id/RelativeLayout01"

android:layout_width="fill_parent"

android:layout_height="fill_parent"

xmlns:android="http://schemas.android.com/apk/res/android">

<
com.google.android.maps.MapView

android:id="@+id/mapview"
android:layout_width="fill_parent"

android:layout_height="fill_parent"

android:clickable="true"

android:apiKey="0ujyc9Tw2cYvyPECIKTQIK0pwuL-UPa_sh4BpIw"/>

</RelativeLayout>

Now, the problem i get is the app crashes on startup, the KVM is complaining about not being able to resolve the superclass. The following is the logcat:

W/dalvikvm( 947): Class resolved by unexpected DEX: Lcom/splashapps/maps/MapTes
t;(0x43736190):0x192028 ref [Lcom/google/android/maps/MapActivity;] Lcom/google/
android/maps/MapActivity;(0x43736190):0x188088
W/dalvikvm( 947): Unable to resolve superclass of Lcom/splashapps/maps/MapTest;
(34)
W/dalvikvm( 947): Link of class 'Lcom/splashapps/maps/MapTest;' failed


as you can see, for some reason, its putting a capital 'L' in from of the name of the class, so can't find it. I'm sure this is something stupid I've done in setting up the class paths but can figure it out. Its driving me nuts....spent the last 3 hours trying to fix it

If anyone could help me out in solving the problem, that would literally be amazing......

Thanks in advance

garethcwilliams is offline  
Reply With Quote
Sponsors
Old March 8th, 2010, 11:47 AM   #2 (permalink)
New Member
 
Join Date: Feb 2010
Posts: 12
 
Device(s): HTC Magic
Thanks: 0
Thanked 0 Times in 0 Posts
Default unable to load superclass

Hi,

Did you ever get any answers with regards to the google maps problem in this thread?

I'm having the same issue.

Thanks,

Jay
parakayjay is offline  
Reply With Quote
Reply

Bookmarks

Tags
android, kvm, mapview


Go Back   Android Forums > Android Discussion > Android Applications User CP
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Android Game Development Tutorial marzec Application Development 15 January 16th, 2012 09:20 AM
New to Android and already stuck with the Tab Tutorial... kivy Application Development 6 February 10th, 2011 10:32 AM
Google MapView tutorial Problem babyboss Developer 101 8 December 16th, 2010 08:15 PM
Tutorial: Android Sync App openmobster Developer 101 0 November 13th, 2010 03:14 PM
Android custom bootscreens tutorial. WACOMalt Android Themes 0 August 5th, 2010 11:14 PM



All times are GMT -5. The time now is 12:16 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Custom vBulletin Skins by: Relivo


SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.