Map not dislpaying in Android sdk 1.5

Put problem concerning MapActivities, MapViews, Overlays and GPS in this forum.

Map not dislpaying in Android sdk 1.5

Postby Shalni » Thu May 21, 2009 1:58 pm

Hi ,

I have upgraded from 1.1 to 1.5 sdk and not getting maps. But able to get connected to the internet through the browser. Have given the same "emulator @Maps -http-proxy http://username:password@machinename:port" but not working. Also have done the settings of APN. Due to APN settings was able to get connected to the browser but not able to retrieve maps.
Plz help me. Its very very very urgent.

Thanks so much in advance.
Shalni
Junior Developer
Junior Developer
 
Posts: 17
Joined: Wed Apr 29, 2009 6:31 am

Top

AVD problem?

Postby guitarbaka » Fri May 22, 2009 3:22 am

When you created the AVD did you make sure to create the one with Google APIs? that is target 3.
If you didnt, then your new emulator is probably a target 2 and will not display maps.
guitarbaka
Junior Developer
Junior Developer
 
Posts: 13
Joined: Fri May 22, 2009 2:19 am
Location: Pomona, CA

Map not dislpaying in Android sdk 1.5

Postby Shalni » Fri May 22, 2009 6:46 am

Hi,

Thanks for the quick suggestion but then i have done that. Its not even displaying the maps which is on the home page. I have generated the new API key. But then at least it has to first work in the maps(homepage). If there is any other suggestion plz let me know at the earliest. Really stuck up. :cry:
Shalni
Junior Developer
Junior Developer
 
Posts: 17
Joined: Wed Apr 29, 2009 6:31 am

Postby guitarbaka » Fri May 22, 2009 7:59 am

ok I thought of something. Are you using target 3 as your main emulator? did you also create a target 2 and might be running it as the build target when running your application?

Click on the properties of your project, on the left panel click on ANDROID and make sure that Google's API is selected as your build target.
Also make sure that the key generated for your maps was created with the debug.keystore for build target 3 ( Google's API one), or else your key will not work for this emulator.

I hope I make sense, its kind of late and Im tired. Hope it helps
guitarbaka
Junior Developer
Junior Developer
 
Posts: 13
Joined: Fri May 22, 2009 2:19 am
Location: Pomona, CA

Postby Leonard » Sat May 23, 2009 12:29 pm

OK so I just deleted the debug.keystore file, rebuilt the project under Google API/Target 3 to make sure I have a compliant key, reregistered it, still no map whatsoever...
Leonard
Freshman
Freshman
 
Posts: 6
Joined: Mon May 18, 2009 1:50 pm
Location: Munich, DE

Postby guitarbaka » Sun May 24, 2009 6:54 am

hmmm, check if the internet is running on the emulator, else I cant think of anything else, sorry...
guitarbaka
Junior Developer
Junior Developer
 
Posts: 13
Joined: Fri May 22, 2009 2:19 am
Location: Pomona, CA

Top

Postby Leonard » Sun May 24, 2009 3:33 pm

Internet and firewall are both good...

EDIT
OK so i just tried out the MapView tutorial on a different machine. Also instead of using
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. mapView.getZoomControls()
Parsed in 0.030 seconds, using GeSHi 1.0.8.4
, which is said to be deprecated, I used
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. mapView.setBuiltInZoomControls(true)
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
, as instructed by the Javadoc. This way the LinearLayout, in which the Zooming buttons were placed, is obsolete.

I have exactly the same code on both machines now but like before no map on the other one...
Leonard
Freshman
Freshman
 
Posts: 6
Joined: Mon May 18, 2009 1:50 pm
Location: Munich, DE

Postby guitarbaka » Sun May 24, 2009 6:33 pm

wait, I thought this whole time you were just trying to run the MAPS that come with the emulator and it doesnt work. But if it is your code, then please post the code in the .java file and the manifest.

Also, let me give you the code I use to run MAPS on mine with a listener that listens to change in position when I use DDMS.
Attachments
MyGPS.rar
(35.65 KiB) Downloaded 65 times
guitarbaka
Junior Developer
Junior Developer
 
Posts: 13
Joined: Fri May 22, 2009 2:19 am
Location: Pomona, CA

Map not dislpaying in Android sdk 1.5

Postby Shalni » Mon May 25, 2009 7:20 am

Hi,

I have selected target 3 itself. Still not working. And m able to get connected to the internet after setting up AVN settings. Once i give my authentication it gets connected to the internet. But Maps which is in the emulator still not working. I hope m clear to u. Plz let me know if there is any other settings on the emulator to be made. According to me it must be some firewall problem. Not sure... :cry:
Please help.... :idea:
Shalni
Junior Developer
Junior Developer
 
Posts: 17
Joined: Wed Apr 29, 2009 6:31 am

Postby Leonard » Mon May 25, 2009 11:13 am

The code is basically from Android's MapView Tutorial with changes mentioned above, the built-in Maps app works fine on both machines.

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  
  2. package com.example.hellomapview;
  3.  
  4.  
  5.  
  6. import com.google.android.maps.MapActivity;
  7.  
  8. import com.google.android.maps.MapView;
  9.  
  10.  
  11.  
  12. import android.app.Activity;
  13.  
  14. import android.os.Bundle;
  15.  
  16. import android.widget.LinearLayout;
  17.  
  18. import android.widget.ZoomControls;
  19.  
  20.  
  21.  
  22. public class HelloMapView extends MapActivity {
  23.  
  24.        
  25.  
  26.         LinearLayout linearLayout;
  27.  
  28.         MapView mapView;
  29.  
  30.         ZoomControls mapZoom;
  31.  
  32.        
  33.  
  34.     /** Called when the activity is first created. */
  35.  
  36.     @Override
  37.  
  38.     public void onCreate(Bundle savedInstanceState) {
  39.  
  40.         super.onCreate(savedInstanceState);
  41.  
  42.         setContentView(R.layout.main);
  43.  
  44.        
  45.  
  46.         mapView = (MapView) findViewById(R.id.mapview);
  47.  
  48.         mapView.setBuiltInZoomControls(true);        
  49.  
  50.        
  51.  
  52.     }
  53.  
  54.  
  55.  
  56.         @Override
  57.  
  58.         protected boolean isRouteDisplayed() {
  59.  
  60.                 // TODO Auto-generated method stub
  61.  
  62.                 return false;
  63.  
  64.         }
  65.  
  66. }
  67.  
  68.  
Parsed in 0.036 seconds, using GeSHi 1.0.8.4



Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1.  
  2. <?xml version="1.0" encoding="utf-8"?>
  3.  
  4. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  5.  
  6.      package="com.example.hellomapview"
  7.  
  8.      android:versionCode="1"
  9.  
  10.      android:versionName="1.0">
  11.  
  12.     <uses-permission android:name="android.permission.INTERNET" />
  13.  
  14.    
  15.  
  16.     <application android:icon="@drawable/icon" android:label="@string/app_name">
  17.  
  18.         <uses-library android:name="com.google.android.maps" />
  19.  
  20.         <activity android:name=".HelloMapView"
  21.  
  22.                  android:label="@string/app_name">
  23.  
  24.             <intent-filter>
  25.  
  26.                 <action android:name="android.intent.action.MAIN" />
  27.  
  28.                 <category android:name="android.intent.category.LAUNCHER" />
  29.  
  30.             </intent-filter>
  31.  
  32.         </activity>
  33.  
  34.     </application>
  35.  
  36.     <uses-sdk android:minSdkVersion="3" />
  37.  
  38.  
  39.  
  40. </manifest>
  41.  
  42.  
Parsed in 0.004 seconds, using GeSHi 1.0.8.4
Leonard
Freshman
Freshman
 
Posts: 6
Joined: Mon May 18, 2009 1:50 pm
Location: Munich, DE

Postby sushil kathade » Tue Sep 01, 2009 1:28 pm

Leonard wrote:The code is basically from Android's MapView Tutorial with changes mentioned above, the built-in Maps app works fine on both machines.

Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. package com.example.hellomapview;
  2.  
  3. import com.google.android.maps.MapActivity;
  4. import com.google.android.maps.MapView;
  5.  
  6. import android.app.Activity;
  7. import android.os.Bundle;
  8. import android.widget.LinearLayout;
  9. import android.widget.ZoomControls;
  10.  
  11. public class HelloMapView extends MapActivity {
  12.        
  13.         LinearLayout linearLayout;
  14.         MapView mapView;
  15.         ZoomControls mapZoom;
  16.        
  17.     /** Called when the activity is first created. */
  18.     @Override
  19.     public void onCreate(Bundle savedInstanceState) {
  20.         super.onCreate(savedInstanceState);
  21.         setContentView(R.layout.main);
  22.        
  23.         mapView = (MapView) findViewById(R.id.mapview);
  24.         mapView.setBuiltInZoomControls(true);        
  25.        
  26.     }
  27.  
  28.         @Override
  29.         protected boolean isRouteDisplayed() {
  30.                 // TODO Auto-generated method stub
  31.                 return false;
  32.         }
  33. }
  34.  
Parsed in 0.037 seconds, using GeSHi 1.0.8.4



Syntax: [ Download ] [ Hide ]
Using xml Syntax Highlighting
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <manifest xmlns:android="http://schemas.android.com/apk/res/android"
  3.      package="com.example.hellomapview"
  4.      android:versionCode="1"
  5.      android:versionName="1.0">
  6.     <uses-permission android:name="android.permission.INTERNET" />
  7.    
  8.     <application android:icon="@drawable/icon" android:label="@string/app_name">
  9.         <uses-library android:name="com.google.android.maps" />
  10.         <activity android:name=".HelloMapView"
  11.                  android:label="@string/app_name">
  12.             <intent-filter>
  13.                 <action android:name="android.intent.action.MAIN" />
  14.                 <category android:name="android.intent.category.LAUNCHER" />
  15.             </intent-filter>
  16.         </activity>
  17.     </application>
  18.     <uses-sdk android:minSdkVersion="3" />
  19.  
  20. </manifest>
  21.  
Parsed in 0.004 seconds, using GeSHi 1.0.8.4



I also have same problem.
I have created AVD with type 3 i.e. with Google API for Map. And also done all proxy setting .
I am able to access internet but unable to access Map (Both in My Application and in Emulator's Application). Log shows InetAddress : Unknown Host exception :www.google.com

please help me .
sushil kathade
Junior Developer
Junior Developer
 
Posts: 12
Joined: Thu Feb 19, 2009 1:01 pm

Postby shishir.bobby » Wed Sep 02, 2009 9:56 am

same problem here..i hv also switched from 1.1 to 1.5 and hv all things,map key,google api key 1.5, ineterenet running in android....but m getting this in console


[2009-09-02 14:18:58 - maps] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY
[2009-09-02 14:18:58 - maps] Please check logcat output for more details.
[2009-09-02 14:18:58 - maps] Launch canceled!



any suggestions???

thanks and regards
shishir.bobby
Experienced Developer
Experienced Developer
 
Posts: 76
Joined: Thu Apr 09, 2009 11:41 am

Postby Pushpalata » Wed Sep 23, 2009 5:42 pm

Hello,
I m very new for the android platform. I want to build an application in it. I hv tried small codes first to understand this platform.
Now I want to enable GMAP in my application through coding. I read the android developers guide for enbling the map on Emulator ,and according to that I successfuly got the Map API key(MD5 fingerprint) and then i pasted thet key in main.xml file. bt still i dint got map view.. :?:

plz help me...
I m using Eclipse(Galelio nd Europa3.3) with sdk 1.5 release 3.
If possible plz give me a whole code form the very starting step as early as possible......I need it urgently..

Thanx in advance....!
PUSHPALATA
Pushpalata
Freshman
Freshman
 
Posts: 6
Joined: Wed Sep 23, 2009 5:12 pm

Postby stunnahonsa » Wed Feb 03, 2010 1:26 am

get sure to select the AVD "Google APis (Google Inc.)" not the "Android"
stunnahonsa
Freshman
Freshman
 
Posts: 2
Joined: Wed Feb 03, 2010 1:23 am

Just make sure.

Postby pranav09 » Sat Feb 27, 2010 1:16 pm

Hi Shalni,

Just make sure of your any project property with the below image. You will automatically get the solution. You should have Google APIs Google Inc in your project property. Just compare with it.
Attachments
project_propery_img.png
project_propery_img.png (22.67 KiB) Viewed 608 times
User avatar
pranav09
Senior Developer
Senior Developer
 
Posts: 128
Joined: Mon Jan 19, 2009 12:01 pm
Location: Ahmedabad, India

Top

Return to Map Problems

Who is online

Users browsing this forum: No registered users and 4 guests