今日、Google Maps Android API v2のドキュメントを読みましたが、のプロジェクトはandroid-sdk\extras\google\google_play_services\samples\maps
実行できると書かれていましたが、eclipseにインポートしてandroid-support-v4.jar
、google-play-services.jarのライブラリを正しく設定import com.example.mapdemo.R;
した後FeatureView.java
(24行目)は実行できませんファイルを見つけるR.java.
クラス「R」を必要とするほとんどすべてのJavaファイル。com.example.mapdemo
たとえば、ファイルBasicMapActivity.javaは41行目setContentView(R.layout.basic_demo);
と71行目でRを必要としますmMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
。誰かがクラス「R」を見つける方法を教えてもらえますか?
R
.java can not create automatically because the file multimap_demo.xml have some errors in
<br><br> <fragment
<br> android:id="@+id/map3"
<br> android:layout_width="match_parent"
<br> android:layout_height="match_parent"
<br> android:layout_weight="0.5"
<br> class="com.google.android.gms.maps.SupportMapFragment"
<br> map:cameraTargetLat="48.85"
<br> map:cameraTargetLng="2.35"
<br> map:cameraZoom="8"/>
<br><br>
eclipseによると、「cameraTargetLat」、「cameraTargetLng」、「cameraZoom」は認識できません。エラー情報:
Multiple annotations found at this line:
- error: No resource identifier found for attribute 'cameraTargetLat' in package 'com.example.mapdemo'
- error: No resource identifier found for attribute 'cameraTargetLng' in package 'com.example.mapdemo'
- error: No resource identifier found for attribute 'cameraZoom' in package 'com.example.mapdemo'
I do not know why.
If I change the code like this:
<br><br> <fragment
<br> android:id="@+id/map3"
<br> android:layout_width="match_parent"
<br> android:layout_height="match_parent"
<br> android:layout_weight="0.5"
<br> class="com.google.android.gms.maps.SupportMapFragment"/>
<br><br>
エラーは消えましたが、実行できるかどうかわかりません。