2016-11-04 94 views
0

我是一個大問題中,的Android 2.3.x版本崩潰的com.google.android.gms.location.LocationSettingsResult.startResolutionForResult

操作系統版本:Android的2.3.x版本 設備:GT I9100(三星GALAXY S II) 位置API:com.google.android.gms:發揮服務定位:9.4.0

問題:應用程序崩潰調用 com.google.android.gms.location.LocationSettingsResult.startResolutionForResult

com.google.android.gms.ui E/AndroidRuntime: FATAL EXCEPTION: main java.lang.RuntimeException: Binary XML file line #25: You must supply a layout_height attribute. 

致命例外:main java.lang.RuntimeException:二進制XML文件行#25:您必須提供layout_height屬性。在android.view.ViewGroup $ LayoutParams.setBaseAttributes(ViewGroup.java:3599) at android.view.ViewGroup $ MarginLayoutParams。(ViewGroup.java())中的android.content.res.TypedArray.getLayoutDimension(TypedArray.java:543) :3678) 在android.widget.LinearLayout $的LayoutParams(LinearLayout.java:1400) 在android.widget.LinearLayout.generateLayoutParams(LinearLayout.java:1326) 在android.widget.LinearLayout.generateLayoutParams(LinearLayout.java: 47) at android.view.LayoutInflater.rInflate(LayoutInflater.java:625) at android.view.LayoutInflater.inflate(LayoutInflater.java:408) at android.view.LayoutInflat在com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2261) at com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2316) at com.android.internal.policy.impl.PhoneWindow.getDecorView(PhoneWindow.java:1478) at android.app.ActivityThread。 handleResumeActivity(ActivityThread.java:2165) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1672) at android.app.ActivityThread.access $ 1500(ActivityThread.java:117) at android.app.ActivityThread $ H .handleMessage(ActivityThread.java :935) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:130) at android.app.ActivityThread.main(ActivityThread.java:3691 ) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:507) at com.android.internal.os.ZygoteInit $ MethodAndArgsCaller.run( ZygoteInit.java:907) 在com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665) 在dalvik.system.NativeStart.main(本機方法)

請參考下面的鏈接,我完全是山姆Ë問題 https://code.google.com/p/android/issues/detail?id=215183

請幫我解決這個

感謝

+0

該錯誤消息看起來相當不恰當:_您必須提供一個layout_height屬性._您的佈局XML中的某個位置(第25行?)可能有一個視圖沒有layout_height屬性。如果沒有定義,你還需要一個layout_width屬性。這是所有觀點都需要的兩個屬性。 – pathfinderelite

+0

這不是我的佈局...他們指的是android.location.gms.ui – sam

+0

你確定嗎?我沒有看到任何反映這一點的錯誤信息。你將什麼活動傳遞給'startResolutionForResult()'? – pathfinderelite

回答

0

請檢查由@frieza在這個相關SO post給它是否能夠幫助解決方案。

至於建議,除了規定在發佈代碼所示layout_heightlayout_width屬性,你可能還需要設置父屬性與parent="android:Theme"

希望也適合你。

+0

感謝您的回答...但我要指定主題?當我爲位置設置請求調用startResolutionForResult時,這種崩潰發生在com.google.android.gms.ui中 – sam