请帮我。
为什么android google map v2 stackoverflowerror?
安卓版本 4.3 nexus7
它只发生在这个设备上吗?-> 是的
这是整个代码吗?-> 是的
zoomLevel 15 和东京站 -> stackoverflowerror 发生
这是我的代码:
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.globalpositioningsystem_adv_main);
Log.d("onCreate","onCreate");
setUpMapIfNeeded();
}
private void setUpMapIfNeeded() {
Log.d("setUpMapIfNeeded","setUpMapIfNeeded");
if (map == null) {
map = ((SupportMapFragment) getSupportFragmentManager()
.findFragmentById(R.id.map)).getMap();
if (map != null) {
setUpMap();
}
}
}
private void setUpMap() {
map.getUiSettings().setZoomControlsEnabled(true);
map.getUiSettings().setZoomGesturesEnabled(true);
map.setMyLocationEnabled(true);
map.setMapType(GoogleMap.MAP_TYPE_NORMAL);
}
这是我的xml代码:
<fragment
android:id="@+id/map"
android:layout_width="match_parent"
android:layout_height="match_parent"
class="com.google.android.gms.maps.SupportMapFragment"
/>
此错误消息:
致命异常:GLThread 1393
java.lang.StackOverflowError
at maps.at.ba.b(Unknown Source)
at maps.at.ba.a(Unknown Source)
at maps.hqe(Unknown Source)
at maps.hqf(Unknown Source)
此线程消息:线程 [<31> GLThread 4064](暂停(异常 StackOverflowError))
this af (id=830044410896)
a false
b true
c false
contextClassLoader LoadedApk$WarningContextClassLoader (id=830044221600)
d false
daemon false
e true
f false
g false
group ThreadGroup (id=830029862656)
h false
hasBeenStarted true
i false
id 4064
inheritableValues null
interruptActions ArrayList (id=830038471784)
j false
k 800 l 1053
localValues ThreadLocal$Values (id=830038946536)
m 0
n true
name "GLThread 4064" (id=830038884576)
o true
p ArrayList (id=830043209400)
parkBlocker null
parkState 1
priority 5
q false
ra e (id=830037523264)
s WeakReference (id=830043387808) stackSize
0
target null
uncaughtHandler null
vmThread VMThread (编号=830043209456)