【问题标题】:I cant import MapView for android project我无法为 android 项目导入 MapView
【发布时间】:2011-08-30 11:38:17
【问题描述】:
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);
}

}

我尝试导入这个: 导入 com.google.android.maps.MapActivity;

但是当我输入 com. - 谷歌没有出现..

【问题讨论】:

  • 您是否将 Google API 设置为项目构建目标?
  • 项目---> 属性..更改 sdk??还是你的意思是别的

标签: android eclipse google-maps


【解决方案1】:

1- 转到项目属性 2- 从 android 选项卡中,为您的目标平台选择 Google API (对于 2.2,选择 Google APIs-Platform 2.2 和类似的东西)

我觉得这样可以解决问题

【讨论】:

  • 谢谢..但我选择 3.2 作为我的 sdk 的最高版本
【解决方案2】:

您必须将 map.jar 添加到库中。虽然它是在我们扩展 MapActivity 时自动添加的。

【讨论】:

  • Kamal..that doesn't tell me anything
猜你喜欢
  • 2016-01-25
  • 2019-02-04
  • 2015-02-24
  • 1970-01-01
  • 2014-04-06
  • 2020-07-31
  • 1970-01-01
  • 1970-01-01
  • 2013-05-10
相关资源
最近更新 更多