2013-07-25 2 views
1

https://blog-emildesign.rhcloud.com/?p=435에서 인터넷에서 제공 한 지침에 따라 &을 내 갤럭시 S IV에서 실행하려고했지만 비워졌습니다. + 및 - 버튼이있는 화면으로, 프로젝트의 모든 파일을 사용자에게 제공하고 있습니다. 도와주세요.Android Google지도 V2 빈 화면으로 확대/축소하고 있지만지도가 없습니다.

1.AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
package="com.example.mapwithgps" 
android:versionCode="1" 
android:versionName="1.0" > 

<uses-sdk 
    android:minSdkVersion="14" 
    android:targetSdkVersion="17" /> 

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

<permission android:name="com.example.mapwithgps.permission.MAPS_RECEIVE" android:protectionLevel="signature"/> 
<uses-permission android:name="com.example.mapwithgps.permission.MAPS_RECEIVE"/> 
<uses-permission android:name="android.permission.INTERNET" /> 
<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" /> 

<application 
    android:allowBackup="true" 
    android:icon="@drawable/ic_launcher" 
    android:label="@string/app_name" 
    android:theme="@style/AppTheme" > 
    <activity 
     android:name="com.example.mapwithgps.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="AIzaSyCNChGhmjHFvLp4atblSojMLvnnfg-_QZA" /> 


</application> 

</manifest> 

2.activity_main.xml

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:orientation="vertical" > 

<fragment 
    android:name="com.google.android.gms.maps.SupportMapFragment" 

    android:id="@+id/map" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" /> 
</LinearLayout> 

3.MainActivity.java 것은

package com.example.mapwithgps; 

import android.os.Bundle; 
import android.support.v4.app.FragmentActivity; 
import android.view.Menu; 


public class MainActivity extends FragmentActivity { 

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

@Override 
public boolean onCreateOptionsMenu(Menu menu) { 
    // Inflate the menu; this adds items to the action bar if it is present. 
    getMenuInflater().inflate(R.menu.main, menu); 
    return true; 
} 

} 

나 응용 프로그램을 실행하는 데 도움이 바랍니다.

답변

-1

내 Google지도 가이드를봤을 것입니다. 좋은 점은 minSDKVersion이 14 일 경우 FragmentActivitySupportMapFragment 개체를 사용하는 데 아무런 의미가 없으므로 간단하게 ActivityMapFragment으로 변경할 수 있습니다.

Google Maps API V2 Key

및 확인 :이 가이드의 모든 단계를 따라 당신은 아직도 내가뿐만 아니라이 가이드를 통해 갈 당신을 제안 줌 컨트롤 빈지도의 문제가있는 경우

두 번째 Google API 콘솔에서 키를 생성하고 올바르게 구성했는지 확인하십시오.