开发者

I cant import MapView for android project

开发者 https://www.devze.com 2023-03-31 22:34 出处:网络
public class ActivityGoogleMaps extends MapActivity {// map view shows as an error /** Called when the activity is first created. */
public class ActivityGoogleMaps extends MapActivity {// map view shows as an error
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
}

}

I 开发者_如何学运维try to import this: import com.google.android.maps.MapActivity;

but when i type com. - google doesnt appear..


1- Go to Project Properties 2- From android tab, select Google API for your target platform (for 2.2, select Google APIs-Platform 2.2 and things like that)

I think this can solve the problem


you will have to add map.jar to libs. though it is automatically added when we extends MapActivity.

0

精彩评论

暂无评论...
验证码 换一张
取 消