1

1 주일 동안이 문제로 인해 계속 진행할 필요가 없습니다. 나는 그저 빈지도로 활동을 얻는다.GoogleMaps API v2가 절실 함

처음에 나는 google maps developers site에 대한 지침을 따라 갔지만 성공하지 못했습니다. 그런 다음 google play service mapdemo에서 일부 코드를 복사하려고했지만 여전히 실패했습니다. SupportMapFragment를 만들기 위해 여기에서 찾은 모든 것과 다른 사이트를 모두 시도했지만 아무런 도움이되지 않았습니다.

google mapdemo 자체는 내 디버깅 장치 (samsung s6500)에서 잘 실행됩니다.

감사

로그 캣 :

07-21 22:12:33.819: W/dalvikvm(13123): VFY: unable to resolve instance field 27 
07-21 22:12:34.019: W/dalvikvm(13123): Unable to resolve superclass of Lmaps/p/w; (718) 
07-21 22:12:34.019: W/dalvikvm(13123): Link of class 'Lmaps/p/w;' failed 
07-21 22:12:34.019: W/dalvikvm(13123): Unable to resolve superclass of Lmaps/aq/as; (5347) 
07-21 22:12:34.019: W/dalvikvm(13123): Link of class 'Lmaps/aq/as;' failed 
07-21 22:12:34.019: W/dalvikvm(13123): Unable to resolve superclass of Lmaps/ag/l; (4576) 
07-21 22:12:34.019: W/dalvikvm(13123): Link of class 'Lmaps/ag/l;' failed 
07-21 22:12:34.019: E/dalvikvm(13123): Could not find class 'maps.ag.l', referenced from method maps.ah.an.a 
07-21 22:12:34.019: W/dalvikvm(13123): VFY: unable to resolve new-instance 4420 (Lmaps/ag/l;) in Lmaps/ah/an; 
07-21 22:12:34.559: E/Adreno200-ES20(13123): **** 13302: glUseProgram(0) 
07-21 22:12:34.759: E/Adreno200-EGLSUB(13123): Enter: GetBackBuffer(), surface: 0x2c7938, bufid: 0 
07-21 22:12:34.759: E/Adreno200-EGLSUB(13123): Return: GetBackBuffer(), TRUE 
07-21 22:12:34.769: E/Adreno200-EGLSUB(13123): Enter: GetBackBuffer(), surface: 0x2c7938, bufid: 1 
07-21 22:12:34.769: E/Adreno200-EGLSUB(13123): Return: GetBackBuffer(), TRUE 
07-21 22:12:34.779: E/Adreno200-EGLSUB(13123): Enter: GetBackBuffer(), surface: 0x2c7938, bufid: 0 
07-21 22:12:34.779: E/Adreno200-EGLSUB(13123): Return: GetBackBuffer(), TRUE 
07-21 22:12:34.799: E/Adreno200-EGLSUB(13123): Enter: GetBackBuffer(), surface: 0x2c7938, bufid: 1 
07-21 22:12:34.799: E/Adreno200-EGLSUB(13123): Return: GetBackBuffer(), TRUE 
07-21 22:12:34.819: E/Adreno200-EGLSUB(13123): Enter: GetBackBuffer(), surface: 0x2c7938, bufid: 0 
07-21 22:12:34.819: E/Adreno200-EGLSUB(13123): Return: GetBackBuffer(), TRUE 
07-21 22:12:34.839: E/Adreno200-EGLSUB(13123): Enter: GetBackBuffer(), surface: 0x2c7938, bufid: 1 
07-21 22:12:34.839: E/Adreno200-EGLSUB(13123): Return: GetBackBuffer(), TRUE 
. 
. 
. 
.... 

매니페스트 :

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="iOphir.mapapp" 
    android:versionCode="1" 
    android:versionName="1.0" > 
    <permission 
     android:name="iOphir.mapapp.permission.MAPS_RECEIVE" 
     android:protectionLevel="signature"/> 
    <uses-permission android:name="iOphir.mapapp.permission.MAPS_RECEIVE"/> 
    <uses-sdk 
     android:minSdkVersion="8" 
     android:targetSdkVersion="17" /> 
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/> 
    <uses-permission android:name="android.permission.INTERNET"/> 
    <uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/> 
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/> 


    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/> 
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/> 

    <uses-feature 
     android:glEsVersion="0x00020000" 
     android:required="true"/> 

    <application 
     android:allowBackup="true" 
     android:icon="@drawable/ic_launcher" 
     android:label="@string/app_name" 
     android:theme="@style/AppTheme" 
     android:hardwareAccelerated="true" > 
        <meta-data 
       android:name="com.google.android.maps.v2.API_KEY" 
       android:value="AIza-----------"/> 
     <activity 
      android:name="iOphir.mapapp.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> 
     <activity 
      android:name="iOphir.mapapp.MapActivity" 
      android:label="@string/title_activity_map" /> 
    </application> 

</manifest> 

활동

package iOphir.mapapp; 

import iOphir.mapapp.R; 
import android.os.Bundle; 
import android.support.v4.app.FragmentActivity; 

import com.google.android.gms.maps.GoogleMap; 
import com.google.android.gms.maps.SupportMapFragment; 
import com.google.android.gms.maps.model.LatLng; 
import com.google.android.gms.maps.model.MarkerOptions; 

public class MapActivity extends FragmentActivity { 

    private GoogleMap mMap; 
    @Override 
    protected void onCreate(Bundle savedInstanceState) { 
     super.onCreate(savedInstanceState); 
     setContentView(R.layout.activity_map); 
     setUpMapIfNeeded(); 

    } 

    @Override 
    protected void onResume() { 
     super.onResume(); 
     setUpMapIfNeeded(); 

    } 


    private void setUpMapIfNeeded() { 
     // Do a null check to confirm that we have not already instantiated the map. 
     if (mMap == null) { 
      // Try to obtain the map from the SupportMapFragment. 
      mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)) 
        .getMap(); 
      // Check if we were successful in obtaining the map. 
      if (mMap != null) { 
       setUpMap(); 
      } 
     } 
    } 


    private void setUpMap() { 
     mMap.addMarker(new MarkerOptions().position(new LatLng(0, 0)).title("Marker")); 
    } 
} 

레이아웃 :

<?xml version="1.0" encoding="utf-8"?> 

<fragment xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:map="http://schemas.android.com/apk/res-auto" 
    android:id="@+id/map" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    class="com.google.android.gms.maps.SupportMapFragment" /> 
+0

레이아웃 파일의 '조각'에 'class = "com.google.android.gms.maps.SupportMapFragment"속성이 있습니까? – Luksprog

+0

메일을 보낸 직후 로그와 문제를 편집했습니다. 감사. – Ophir

+0

빈지도를 얻으려면 logcat에서 설명을 확인해야합니다. 승인 오류 일 경우 패키지 및 해당 패키지에 서명 한 인증서의 적절한 키 (많은 관련 질문)로 앱에 서명했는지 확인하십시오. 또한 각 시도 후에 제거/다시 설치하십시오. – Luksprog

답변

0

발견. 지금은 바보 같아.

내 패키지는 .mapapp이지만 SHA-1 지문을 입력 한 후 .mappapp로 끝냈습니다.

오 ... 나는 그것에 빠지기 때문에 나는 그것을 극복하기에 좋았지 만, 새끼.

누구든지 사용해 주셔서 감사합니다.