【发布时间】:2012-03-16 09:35:18
【问题描述】:
我正在尝试在我的应用程序中使用地图,但出现此错误, 在当前主题中找不到样式“mapViewStyle”
我已经正确生成了密钥,并尝试了其他地方针对同一问题提供的所有解决方案。
1.my target api and the one mentioned in the manifest file are the same.
2.There is no import.R in my project
3.I have cleaned my project.
4.Uses-library element is a child of the application.
这是我的 xml 文件
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<com.google.android.maps.MapView
android:id="@+id/mapview1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clickable="true"
android:apiKey="*****************"
android:enabled="true"
/>
</LinearLayout>
这是我对应的java文件
包com.epidemicator.prototype;
import android.os.Bundle;
import com.google.android.maps.MapActivity;
public class Mapacti extends MapActivity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mapview);
}
@Override
protected boolean isRouteDisplayed() {
// TODO Auto-generated method stub
return false;
}
}
请帮帮我... 谢谢。
【问题讨论】:
-
我同意 dmon 查看他/她引用的问题并查看文档code.google.com/android/add-ons/google-apis/…
标签: android xml google-maps