1
嗨查找資源文件我使用谷歌地圖的代碼問題在Android中
這(寫在活動文件
package com.hellomaps;
import android.app.Activity;
import android.os.Bundle;
import com.google.android.maps.MapActivity;
public class HelloGoogleMaps extends MapActivity{
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
MapView類MapView類=(MapView類)findViewById代碼R.id.mapview); mapView.setBuiltInZoomControls(true);
}
在該行的setContentView(R.layout.main)其不recognse「R」,並因此MapView類不能在活動中使用,因爲它不列入recognse視圖
我知道
現在不應導入android.R和com.google.R。
我被困在這裏..親切的幫助..!
在此先感謝