Autore Topic: MapActivity: Couldn't get connection factory client - Mappa non visualizzata  (Letto 1534 volte)

Offline tank

  • Nuovo arrivato
  • *
  • Post: 23
  • Respect: 0
    • Mostra profilo
Salve a tutti! Sto provando ad usare le mappe di Google in un'app, ma purtroppo il risultato ottenuto è questo:

Niente mappa! Compare solo questo e i pulsanti per lo zoom (nello screen non si vedono).
Qui c'è il logcat:
Codice: [Seleziona]
04-01 15:14:06.889: I/MapActivity(28481): Handling network change notification:CONNECTED
04-01 15:14:06.889: E/MapActivity(28481): Couldn't get connection factory client
04-01 15:14:13.059: W/System.err(28481): IOException processing: 26
04-01 15:14:13.069: W/System.err(28481): java.io.IOException: Server returned: 3
04-01 15:14:13.069: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
04-01 15:14:13.069: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
04-01 15:14:13.069: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
04-01 15:14:13.069: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
04-01 15:14:13.069: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
04-01 15:14:13.069: W/System.err(28481):         at java.lang.Thread.run(Thread.java:1019)
04-01 15:14:13.329: W/System.err(28481): IOException processing: 26
04-01 15:14:13.329: W/System.err(28481): java.io.IOException: Server returned: 3
04-01 15:14:13.339: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
04-01 15:14:13.339: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
04-01 15:14:13.339: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
04-01 15:14:13.339: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
04-01 15:14:13.339: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
04-01 15:14:13.339: W/System.err(28481):         at java.lang.Thread.run(Thread.java:1019)
04-01 15:14:13.609: W/System.err(28481): IOException processing: 26
04-01 15:14:13.609: W/System.err(28481): java.io.IOException: Server returned: 3
04-01 15:14:13.609: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
04-01 15:14:13.609: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
04-01 15:14:13.609: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
04-01 15:14:13.609: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
04-01 15:14:13.609: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
04-01 15:14:13.609: W/System.err(28481):         at java.lang.Thread.run(Thread.java:1019)
04-01 15:14:13.869: W/System.err(28481): IOException processing: 26
04-01 15:14:13.879: W/System.err(28481): java.io.IOException: Server returned: 3
04-01 15:14:13.879: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
04-01 15:14:13.879: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
04-01 15:14:13.879: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
04-01 15:14:13.879: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
04-01 15:14:13.879: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
04-01 15:14:13.879: W/System.err(28481):         at java.lang.Thread.run(Thread.java:1019)
04-01 15:14:14.139: W/System.err(28481): IOException processing: 26
04-01 15:14:14.139: W/System.err(28481): java.io.IOException: Server returned: 3
04-01 15:14:14.139: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
04-01 15:14:14.139: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
04-01 15:14:14.139: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
04-01 15:14:14.139: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
04-01 15:14:14.139: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
04-01 15:14:14.139: W/System.err(28481):         at java.lang.Thread.run(Thread.java:1019)
04-01 15:14:14.399: W/System.err(28481): IOException processing: 26
04-01 15:14:14.399: W/System.err(28481): java.io.IOException: Server returned: 3
04-01 15:14:14.399: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
04-01 15:14:14.399: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
04-01 15:14:14.399: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
04-01 15:14:14.399: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
04-01 15:14:14.399: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
04-01 15:14:14.399: W/System.err(28481):         at java.lang.Thread.run(Thread.java:1019)
04-01 15:14:14.669: W/System.err(28481): IOException processing: 26
04-01 15:14:14.669: W/System.err(28481): java.io.IOException: Server returned: 3
04-01 15:14:14.669: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
04-01 15:14:14.669: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
04-01 15:14:14.669: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
04-01 15:14:14.669: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
04-01 15:14:14.669: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
04-01 15:14:14.669: W/System.err(28481):         at java.lang.Thread.run(Thread.java:1019)
04-01 15:14:14.949: W/System.err(28481): IOException processing: 26
04-01 15:14:14.949: W/System.err(28481): java.io.IOException: Server returned: 3
04-01 15:14:14.949: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
04-01 15:14:14.949: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
04-01 15:14:14.949: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
04-01 15:14:14.949: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
04-01 15:14:14.949: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
04-01 15:14:14.949: W/System.err(28481):         at java.lang.Thread.run(Thread.java:1019)
04-01 15:14:15.239: W/System.err(28481): IOException processing: 26
04-01 15:14:15.239: W/System.err(28481): java.io.IOException: Server returned: 3
04-01 15:14:15.239: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
04-01 15:14:15.239: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
04-01 15:14:15.239: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
04-01 15:14:15.239: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
04-01 15:14:15.239: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
04-01 15:14:15.239: W/System.err(28481):         at java.lang.Thread.run(Thread.java:1019)
04-01 15:14:15.509: W/System.err(28481): IOException processing: 26
04-01 15:14:15.509: W/System.err(28481): java.io.IOException: Server returned: 3
04-01 15:14:15.529: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
04-01 15:14:15.529: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
04-01 15:14:15.529: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
04-01 15:14:15.539: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
04-01 15:14:15.539: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
04-01 15:14:15.539: W/System.err(28481):         at java.lang.Thread.run(Thread.java:1019)
04-01 15:14:15.819: W/System.err(28481): IOException processing: 26
04-01 15:14:15.819: W/System.err(28481): java.io.IOException: Server returned: 3
04-01 15:14:15.819: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
04-01 15:14:15.819: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
04-01 15:14:15.819: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
04-01 15:14:15.819: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
04-01 15:14:15.819: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
04-01 15:14:15.819: W/System.err(28481):         at java.lang.Thread.run(Thread.java:1019)
04-01 15:14:16.089: W/System.err(28481): IOException processing: 26
04-01 15:14:16.089: W/System.err(28481): java.io.IOException: Server returned: 3
04-01 15:14:16.089: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
04-01 15:14:16.089: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
04-01 15:14:16.089: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
04-01 15:14:16.099: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
04-01 15:14:16.099: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
04-01 15:14:16.099: W/System.err(28481):         at java.lang.Thread.run(Thread.java:1019)
04-01 15:14:16.379: W/System.err(28481): IOException processing: 26
04-01 15:14:16.379: W/System.err(28481): java.io.IOException: Server returned: 3
04-01 15:14:16.379: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
04-01 15:14:16.379: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
04-01 15:14:16.379: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
04-01 15:14:16.379: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
04-01 15:14:16.389: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
04-01 15:14:16.389: W/System.err(28481):         at java.lang.Thread.run(Thread.java:1019)
04-01 15:14:16.659: W/System.err(28481): IOException processing: 26
04-01 15:14:16.659: W/System.err(28481): java.io.IOException: Server returned: 3
04-01 15:14:16.659: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
04-01 15:14:16.659: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
04-01 15:14:16.659: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
04-01 15:14:16.659: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
04-01 15:14:16.659: W/System.err(28481):         at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)
04-01 15:14:16.659: W/System.err(28481):         at java.lang.Thread.run(Thread.java:1019)
04-01 15:17:33.429: I/MapActivity(28481): Handling network change notification:CONNECTED
04-01 15:17:33.439: W/IdleConnectionHandler(28481): Removing a connection that never existed!

Qui c'è l'activity che gestisce la mappa:
Codice (Java): [Seleziona]
package com.tank.mappa;

import android.os.Bundle;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
import com.google.android.maps.MapController;
import com.google.android.maps.GeoPoint;

public class Mapexample extends MapActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {

        super.onCreate(savedInstanceState);
        setContentView(R.layout.mapexample);

        //fetch the map view from the layout
        MapView mapView = (MapView) findViewById(R.id.mapview);

        //make available zoom controls
        mapView.setBuiltInZoomControls(true);
       
        mapView.setBuiltInZoomControls(true);
        //latitude and longitude of Rome
        double lat = 41.889882;
        double lon = 12.479267;
        //create geo point
        GeoPoint point = new GeoPoint((int)(lat * 1E6), (int)(lon *1E6));
        //get the MapController object
        MapController controller = mapView.getController();
        //animate to the desired point
        controller.animateTo(point);
        //set the map zoom to 13
        // zoom 1 is top world view
        controller.setZoom(13);
        //invalidate the map in order to show changes
        mapView.invalidate();
    }

    @Override
    protected boolean isRouteDisplayed() {

        return false;

    }
}

Il layout:
Codice (XML): [Seleziona]
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
   android:layout_width="fill_parent"
   android:layout_height="fill_parent"
   android:orientation="vertical" >

       <com.google.android.maps.MapView
       android:id="@+id/mapview"
       android:layout_width="fill_parent"
       android:layout_height="fill_parent"
       android:apiKey="AIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXg"
       android:clickable="true" />
</LinearLayout>

Il manifest:
Codice (Java): [Seleziona]
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.tank.mappa"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="9"
                    android:targetSdkVersion="16" />
 
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.CAMERA" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
  <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
  <uses-feature android:name="android.hardware.camera"
                android:required="false"/>
  <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true"/>
 
  <permission
        android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
        android:protectionLevel="signature"/>
<uses-permission android:name="com.tank.mappa.permission.MAPS_RECEIVE" />
  <uses-feature android:name="android.hardware.camera.any"
                android:required="false" />
       
        <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name=".Splash"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
       

        <activity
            android:name=".Home"
            android:label="@string/app_name"
            android:screenOrientation="portrait"></activity>
       
        <activity
            android:name=".Mapexample"
            android:label="Map Example"
            android:screenOrientation="portrait" >
        </activity>
       
       
        <meta-data
                android:name="com.google.android.maps.v2.API_KEY"
                android:value="AIXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXg" />
        <uses-library android:name="com.google.android.maps" />
    </application>

</manifest>


Qualche idea sul malfuzionamento della mappa?
Grazie in anticipo! :)

Offline Nicola_D

  • Utente storico
  • *****
  • Post: 2479
  • SBAGLIATO!
  • Respect: +323
    • Github
    • Google+
    • nicoladorigatti
    • Mostra profilo
  • Dispositivo Android:
    Nexus 6p, Nexus 4, Nexus S, Nexus 7(2012)
  • Sistema operativo:
    Windows 7
IMPORTANTE:NON RISPONDO A PROBLEMI VIA MESSAGGIO PRIVATO
LOGCAT: Non sai cos'è? -> Android Debug Bridge | Android Developers
               Dov'è in Eclipse? -> Window -> Open Prospective -> DDMS e guarda in basso!
[Obbligatorio] Logcat, questo sconosciuto! (Gruppo AndDev.it LOGTFO) - Android Developers Italia

Offline tank

  • Nuovo arrivato
  • *
  • Post: 23
  • Respect: 0
    • Mostra profilo
Re:MapActivity: Couldn't get connection factory client - Mappa non visualizzata
« Risposta #2 il: 01 Aprile 2013, 17:38:03 CEST »
0
Ok, ho seguito la guida di Google integrando le nuove API v2, ma l'applicazione si arresta quando provo a testare la mappa come suggerisce l'ultimo punto della guida. Da quel che ho capito, riguarda il fragment...ma non so come risolvere...

Logcat:
Codice: [Seleziona]
04-01 17:33:13.729: W/dalvikvm(3191): threadid=1: thread exiting with uncaught exception (group=0x401bf560)
04-01 17:33:13.749: E/AndroidRuntime(3191): FATAL EXCEPTION: main
04-01 17:33:13.749: E/AndroidRuntime(3191): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tank.mappa/com.tank.mappa.Mapexample}: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1659)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1675)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.app.ActivityThread.access$1500(ActivityThread.java:121)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:943)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.os.Handler.dispatchMessage(Handler.java:99)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.os.Looper.loop(Looper.java:130)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.app.ActivityThread.main(ActivityThread.java:3768)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at java.lang.reflect.Method.invokeNative(Native Method)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at java.lang.reflect.Method.invoke(Method.java:507)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:878)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:636)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at dalvik.system.NativeStart.main(Native Method)
04-01 17:33:13.749: E/AndroidRuntime(3191): Caused by: android.view.InflateException: Binary XML file line #2: Error inflating class fragment
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:581)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.view.LayoutInflater.inflate(LayoutInflater.java:386)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:207)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.app.Activity.setContentView(Activity.java:1657)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at com.tank.mappa.Mapexample.onCreate(Mapexample.java:11)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1623)
04-01 17:33:13.749: E/AndroidRuntime(3191):         ... 11 more
04-01 17:33:13.749: E/AndroidRuntime(3191): Caused by: java.lang.ClassNotFoundException: android.view.fragment in loader dalvik.system.PathClassLoader[/data/app/com.tank.mappa-2.apk]
04-01 17:33:13.749: E/AndroidRuntime(3191):         at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.view.LayoutInflater.createView(LayoutInflater.java:471)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.view.LayoutInflater.onCreateView(LayoutInflater.java:549)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:66)
04-01 17:33:13.749: E/AndroidRuntime(3191):         at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
04-01 17:33:13.749: E/AndroidRuntime(3191):         ... 19 more

Activity:
Codice (Java): [Seleziona]
package com.tank.mappa;

import android.app.Activity;
import android.os.Bundle;

public class Mapexample extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.mapexample);
    }
}

Layout:
Codice (XML): [Seleziona]
<?xml version="1.0" encoding="utf-8"?>
<fragment xmlns:android="http://schemas.android.com/apk/res/android"
         android:id="@+id/map"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
         android:name="com.google.android.gms.maps.MapFragment"/>

Manifest:
Codice (Java): [Seleziona]
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.tank.mappa"
    android:versionCode="1"
    android:versionName="1.0" >

    <uses-sdk android:minSdkVersion="9"
                    android:targetSdkVersion="16" />
 
  <uses-permission android:name="android.permission.INTERNET" />
  <uses-permission android:name="android.permission.CAMERA" />
  <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
  <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
  <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>
  <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
  <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
  <uses-feature android:name="android.hardware.camera"
                android:required="false"/>
  <uses-feature
        android:glEsVersion="0x00020000"
        android:required="true"/>
 
  <permission
        android:name="com.example.mapdemo.permission.MAPS_RECEIVE"
        android:protectionLevel="signature"/>
<uses-permission android:name="com.tank.mappa.permission.MAPS_RECEIVE" />
  <uses-feature android:name="android.hardware.camera.any"
                android:required="false" />
       
        <application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <activity
            android:name=".Splash"
            android:label="@string/app_name"
            android:screenOrientation="portrait"
            android:theme="@android:style/Theme.NoTitleBar.Fullscreen" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
       
        <activity
            android:name=".Home"
            android:label="@string/app_name"
            android:screenOrientation="portrait"></activity>
       
        <activity
            android:name=".Mapexample"
            android:label="Map Example"
            android:screenOrientation="portrait" >
        </activity>
       
       
        <meta-data
        android:name="com.google.android.maps.v2.API_KEY"
        android:value="AIXXXXXXXXXXXXXXXXXXXXXXXXXXXj6o"/>
       
    </application>

</manifest>

Qual è il problema?  :-\
« Ultima modifica: 01 Aprile 2013, 18:47:18 CEST da tank »

Offline Nicola_D

  • Utente storico
  • *****
  • Post: 2479
  • SBAGLIATO!
  • Respect: +323
    • Github
    • Google+
    • nicoladorigatti
    • Mostra profilo
  • Dispositivo Android:
    Nexus 6p, Nexus 4, Nexus S, Nexus 7(2012)
  • Sistema operativo:
    Windows 7
IMPORTANTE:NON RISPONDO A PROBLEMI VIA MESSAGGIO PRIVATO
LOGCAT: Non sai cos'è? -> Android Debug Bridge | Android Developers
               Dov'è in Eclipse? -> Window -> Open Prospective -> DDMS e guarda in basso!
[Obbligatorio] Logcat, questo sconosciuto! (Gruppo AndDev.it LOGTFO) - Android Developers Italia

Offline tank

  • Nuovo arrivato
  • *
  • Post: 23
  • Respect: 0
    • Mostra profilo
Re:MapActivity: Couldn't get connection factory client - Mappa non visualizzata
« Risposta #4 il: 01 Aprile 2013, 19:34:42 CEST »
0
Eh grazie, so cercare su Google, se vengo a postare qua (per quanto sono pigro a postare) significa che non ho trovato nulla al caso mio.

Offline Nicola_D

  • Utente storico
  • *****
  • Post: 2479
  • SBAGLIATO!
  • Respect: +323
    • Github
    • Google+
    • nicoladorigatti
    • Mostra profilo
  • Dispositivo Android:
    Nexus 6p, Nexus 4, Nexus S, Nexus 7(2012)
  • Sistema operativo:
    Windows 7
Re:MapActivity: Couldn't get connection factory client - Mappa non visualizzata
« Risposta #5 il: 01 Aprile 2013, 21:46:05 CEST »
0
allora si vede che non guardi bene o non hai provato!
non ho mai usato le gmaps, ma guardando il tuo XML e guardando la risposta:
http://stackoverflow.com/a/14083334
mi viene da pensare che qualcosa da modificare ce l'hai, o no?
IMPORTANTE:NON RISPONDO A PROBLEMI VIA MESSAGGIO PRIVATO
LOGCAT: Non sai cos'è? -> Android Debug Bridge | Android Developers
               Dov'è in Eclipse? -> Window -> Open Prospective -> DDMS e guarda in basso!
[Obbligatorio] Logcat, questo sconosciuto! (Gruppo AndDev.it LOGTFO) - Android Developers Italia

Offline tank

  • Nuovo arrivato
  • *
  • Post: 23
  • Respect: 0
    • Mostra profilo
Re:MapActivity: Couldn't get connection factory client - Mappa non visualizzata
« Risposta #6 il: 01 Aprile 2013, 22:18:53 CEST »
0
Ho già provato a risolvere seguendo quel post, ma MapFragment e SupportMapFragment non me li riconosce, nonostante abbia fatto gli import necessari.

Offline Nicola_D

  • Utente storico
  • *****
  • Post: 2479
  • SBAGLIATO!
  • Respect: +323
    • Github
    • Google+
    • nicoladorigatti
    • Mostra profilo
  • Dispositivo Android:
    Nexus 6p, Nexus 4, Nexus S, Nexus 7(2012)
  • Sistema operativo:
    Windows 7
Re:MapActivity: Couldn't get connection factory client - Mappa non visualizzata
« Risposta #7 il: 01 Aprile 2013, 23:17:03 CEST »
0
hai importato la support library?
IMPORTANTE:NON RISPONDO A PROBLEMI VIA MESSAGGIO PRIVATO
LOGCAT: Non sai cos'è? -> Android Debug Bridge | Android Developers
               Dov'è in Eclipse? -> Window -> Open Prospective -> DDMS e guarda in basso!
[Obbligatorio] Logcat, questo sconosciuto! (Gruppo AndDev.it LOGTFO) - Android Developers Italia