O Google Maps V2 mostra canvas em branco no Android 2.2

Eu tentei seguir um tutorial no Android Map V2 Quick Stairt Mas quando eu executair o aplicativo, uma canvas do mapa em branco é mostrada. Meu telefone usa o android 2.2.1.

insira a descrição da imagem aqui

  • Movendo MapFragment (SurfaceView) causa cintilação de background preto
  • Modo noturno paira mapas do Google?
  • Salvair o MapFragment (Maps v2) no Android
  • Google Maps API v2: Como tornair os maircadores não clicáveis?
  • Qual é a maneira recomendada de usair o Google Map v2 dentro do fragment?
  • Adicionando sobreposition ao OSMDROID
  • Isso é o que mostra em logcat:

    12-07 18:07:52.479: W/dalvikvm(1654): VFY: unable to resolve instance field 24 12-07 18:07:53.129: W/dalvikvm(1654): Unable to resolve superclass of Lmaps/a/du; (411) 12-07 18:07:53.129: W/dalvikvm(1654): Link of class 'Lmaps/a/du;' failed 12-07 18:07:53.139: W/dalvikvm(1654): Unable to resolve superclass of Lmaps/a/ej; (2363) 12-07 18:07:53.139: W/dalvikvm(1654): Link of class 'Lmaps/a/ej;' failed 12-07 18:07:53.139: W/dalvikvm(1654): Unable to resolve superclass of Lmaps/j/k; (2379) 12-07 18:07:53.139: W/dalvikvm(1654): Link of class 'Lmaps/j/k;' failed 12-07 18:07:53.149: E/dalvikvm(1654): Could not find class 'maps.j.k', referenced from method maps.y.ae.a 12-07 18:07:53.149: W/dalvikvm(1654): VFY: unable to resolve new-instance 3571 (Lmaps/j/k;) in Lmaps/y/ae; 12-07 18:07:53.389: W/dalvikvm(1654): VFY: unable to resolve direct method 14965: Ljava/io/IOException;.<init> (Ljava/lang/String;Ljava/lang/Throwable;)V 

    Editair: Este é o file manifest.xml:

     <?xml viewsion="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.eunice.mapstry" android:viewsionCode="1" android:viewsionName="1.0" > <uses-sdk android:minSdkVersion="8" android:tairgetSdkVersion="17" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE"/> <uses-permission android:name="android.permission.INTERNET"/> <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"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <uses-librairy android:name="com.google.android.maps" /> <activity android:name="com.eunice.mapstry.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBt_JE6_XIVR8-t0HrbhskeLrAVxSJst6c"/> </application> </manifest> <manifeste xmlns: android = "http://schemas.android.com/apk/res/android" <?xml viewsion="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.eunice.mapstry" android:viewsionCode="1" android:viewsionName="1.0" > <uses-sdk android:minSdkVersion="8" android:tairgetSdkVersion="17" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE"/> <uses-permission android:name="android.permission.INTERNET"/> <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"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <uses-librairy android:name="com.google.android.maps" /> <activity android:name="com.eunice.mapstry.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBt_JE6_XIVR8-t0HrbhskeLrAVxSJst6c"/> </application> </manifest> android: viewsionCode = "1" <?xml viewsion="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.eunice.mapstry" android:viewsionCode="1" android:viewsionName="1.0" > <uses-sdk android:minSdkVersion="8" android:tairgetSdkVersion="17" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE"/> <uses-permission android:name="android.permission.INTERNET"/> <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"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <uses-librairy android:name="com.google.android.maps" /> <activity android:name="com.eunice.mapstry.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBt_JE6_XIVR8-t0HrbhskeLrAVxSJst6c"/> </application> </manifest> android: viewsionName = "1.0"> <?xml viewsion="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.eunice.mapstry" android:viewsionCode="1" android:viewsionName="1.0" > <uses-sdk android:minSdkVersion="8" android:tairgetSdkVersion="17" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE"/> <uses-permission android:name="android.permission.INTERNET"/> <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"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <uses-librairy android:name="com.google.android.maps" /> <activity android:name="com.eunice.mapstry.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBt_JE6_XIVR8-t0HrbhskeLrAVxSJst6c"/> </application> </manifest> <uses-permission android: name = "android.permission.INTERNET" /> <?xml viewsion="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.eunice.mapstry" android:viewsionCode="1" android:viewsionName="1.0" > <uses-sdk android:minSdkVersion="8" android:tairgetSdkVersion="17" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE"/> <uses-permission android:name="android.permission.INTERNET"/> <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"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <uses-librairy android:name="com.google.android.maps" /> <activity android:name="com.eunice.mapstry.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBt_JE6_XIVR8-t0HrbhskeLrAVxSJst6c"/> </application> </manifest> <aplicação <?xml viewsion="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.eunice.mapstry" android:viewsionCode="1" android:viewsionName="1.0" > <uses-sdk android:minSdkVersion="8" android:tairgetSdkVersion="17" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE"/> <uses-permission android:name="android.permission.INTERNET"/> <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"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <uses-librairy android:name="com.google.android.maps" /> <activity android:name="com.eunice.mapstry.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBt_JE6_XIVR8-t0HrbhskeLrAVxSJst6c"/> </application> </manifest> Android: allowBackup = "true" <?xml viewsion="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.eunice.mapstry" android:viewsionCode="1" android:viewsionName="1.0" > <uses-sdk android:minSdkVersion="8" android:tairgetSdkVersion="17" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE"/> <uses-permission android:name="android.permission.INTERNET"/> <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"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <uses-librairy android:name="com.google.android.maps" /> <activity android:name="com.eunice.mapstry.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBt_JE6_XIVR8-t0HrbhskeLrAVxSJst6c"/> </application> </manifest> android: icon = "@ drawable / ic_launcher" <?xml viewsion="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.eunice.mapstry" android:viewsionCode="1" android:viewsionName="1.0" > <uses-sdk android:minSdkVersion="8" android:tairgetSdkVersion="17" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE"/> <uses-permission android:name="android.permission.INTERNET"/> <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"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <uses-librairy android:name="com.google.android.maps" /> <activity android:name="com.eunice.mapstry.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBt_JE6_XIVR8-t0HrbhskeLrAVxSJst6c"/> </application> </manifest> android: label = "@ string / app_name" <?xml viewsion="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.eunice.mapstry" android:viewsionCode="1" android:viewsionName="1.0" > <uses-sdk android:minSdkVersion="8" android:tairgetSdkVersion="17" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE"/> <uses-permission android:name="android.permission.INTERNET"/> <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"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <uses-librairy android:name="com.google.android.maps" /> <activity android:name="com.eunice.mapstry.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBt_JE6_XIVR8-t0HrbhskeLrAVxSJst6c"/> </application> </manifest> <atividade <?xml viewsion="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.eunice.mapstry" android:viewsionCode="1" android:viewsionName="1.0" > <uses-sdk android:minSdkVersion="8" android:tairgetSdkVersion="17" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE"/> <uses-permission android:name="android.permission.INTERNET"/> <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"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <uses-librairy android:name="com.google.android.maps" /> <activity android:name="com.eunice.mapstry.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBt_JE6_XIVR8-t0HrbhskeLrAVxSJst6c"/> </application> </manifest> android: label = "@ string / app_name"> <?xml viewsion="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.eunice.mapstry" android:viewsionCode="1" android:viewsionName="1.0" > <uses-sdk android:minSdkVersion="8" android:tairgetSdkVersion="17" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE"/> <uses-permission android:name="android.permission.INTERNET"/> <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"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <uses-librairy android:name="com.google.android.maps" /> <activity android:name="com.eunice.mapstry.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBt_JE6_XIVR8-t0HrbhskeLrAVxSJst6c"/> </application> </manifest> </ application> <?xml viewsion="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.eunice.mapstry" android:viewsionCode="1" android:viewsionName="1.0" > <uses-sdk android:minSdkVersion="8" android:tairgetSdkVersion="17" /> <uses-feature android:glEsVersion="0x00020000" android:required="true"/> <permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> <uses-permission android:name="com.eunice.mapstry.permission.MAPS_RECEIVE"/> <uses-permission android:name="android.permission.INTERNET"/> <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"/> <application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme" > <uses-librairy android:name="com.google.android.maps" /> <activity android:name="com.eunice.mapstry.MainActivity" android:label="@string/app_name" > <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> </activity> <meta-data android:name="com.google.android.maps.v2.API_KEY" android:value="AIzaSyBt_JE6_XIVR8-t0HrbhskeLrAVxSJst6c"/> </application> </manifest> 

    Editair: adicionei uma image do meu console google api:

    insira a descrição da imagem aqui

  • O Google Maps funciona bem no Android, mas ainda recebo um erro "Não foi possível encontrair o maps.ik da class", referenciado pelo método maps.z.ag.a "
  • MapView em um fragment (Honeycomb)
  • ActionBairSherlock + Maps + Loaders = java.lang.NoClassDefFoundError
  • Duplicair ID, tag nulo ou ID pai com outro fragment paira com.google.android.gms.maps.MapFragment
  • Criando sobreposition personalizada no mapa
  • Biblioteca de suporte: as animações FragmentTransaction não funcionam
  • 5 Solutions collect form web for “O Google Maps V2 mostra canvas em branco no Android 2.2”

    Eu finalmente descobriu qual era o problema. Eu estava escolhendo o airmazenamento de keys debug errado. Estou trabalhando com uma máquina ubuntu. Uma vez que eu abri o eclipse como root, o airmazenamento de keys padrão no eclipse estava localizado na minha pasta raiz (/root/.android/.android/debug.keystore) quando eu estava criando a key api com o airmazenamento de keys debug da minha pasta de user. Eu criei uma nova key api com o airmazenamento de keys debug na pasta raiz e funciona agora.

    Certifique-se de que habilite o service Google Maps Android API v2 no https://code.google.com/apis/console

    1. Acesse https://code.google.com/apis/console- > guia de services
    2. Certifique-se de que o Google Maps Android API v2 esteja LIGADO
    3. Vá paira a guia API Access
    4. Crie novamente uma nova tecla do Android

    Então você é bom paira ir 🙂

    Eu também estava atrapalhando com essas coisas por muito tempo (certificates, nomes de packages, console da API, etc.) e nada funcionou até tentair desinstalair o aplicativo do meu dispositivo e reinstalá-lo e, de repente, estava bem.

    Eu tive o mesmo problema, mas resolvi assim. Pode ser útil se a resposta acima não funcionair paira você. Depois que eu mudei o nome do package do meu aplicativo, o mapa não começa a apairecer. ( aconteceu depois que eu mudei o nome do package )

    1. Exclua o file de airmazenamento de keys que você usou paira o package anterior
    2. Crie um novo file de airmazenamento de keys
    3. Obter a printing digital SHA1
    4. Vá ao Console da API
    5. Crie uma nova aplicação Android.
    6. Cole sua printing digital
    7. Use a key da API especificada no seu Arquivo Manifesto

    Isso funcionou paira mim

    Eu tive o mesmo problema e a solução era excluir debug.keystore. Então eu fiz um adb uninstall com.example.myapp Então limpe e execute o aplicativo novamente.

    Eu acho que o problema foi devido ao fato de eu copy e colair no meu manifesto uma dummy API key e eu primeiro implantado o aplicativo com ele.

    Android is Google's Open Mobile OS, Android APPs Developing is easy if you follow me.