Android 2.3.x在com.google.android.gms.location.LocationSettingsResult.startResolutionForResult

时间:2016-11-04 18:25:56

标签: android google-play-services google-location-services

我正处于一个大问题的中间,

OS VERSION:Android 2.3.x. 设备:GT i9100(三星galaxy s II) LOCATION API:com.google.android.gms:play-services-location:9.4.0

问题:app崩溃调用 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.

致命的例外:主要                                                    java.lang.RuntimeException:二进制XML文件行#25:您必须提供layout_height属性。                                                        在android.content.res.TypedArray.getLayoutDimension(TypedArray.java:543)                                                        在android.view.ViewGroup $ LayoutParams.setBaseAttributes(ViewGroup.java:3599)                                                        在android.view.ViewGroup $ MarginLayoutParams。(ViewGroup.java:3678)                                                        在android.widget.LinearLayout $ LayoutParams。(LinearLayout.java:1400)                                                        在android.widget.LinearLayout.generateLayoutParams(LinearLayout.java:1326)                                                        在android.widget.LinearLayout.generateLayoutParams(LinearLayout.java:47)                                                        在android.view.LayoutInflater.rInflate(LayoutInflater.java:625)                                                        在android.view.LayoutInflater.inflate(LayoutInflater.java:408)                                                        在android.view.LayoutInflater.inflate(LayoutInflater.java:320)                                                        在android.view.LayoutInflater.inflate(LayoutInflater.java:276)                                                        在com.android.internal.policy.impl.PhoneWindow.generateLayout(PhoneWindow.java:2261)                                                        在com.android.internal.policy.impl.PhoneWindow.installDecor(PhoneWindow.java:2316)                                                        在com.android.internal.policy.impl.PhoneWindow.getDecorView(PhoneWindow.java:1478)                                                        在android.app.ActivityThread.handleResumeActivity(ActivityThread.java:2165)                                                        在android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1672)                                                        在android.app.ActivityThread.access $ 1500(ActivityThread.java:117)                                                        在android.app.ActivityThread $ H.handleMessage(ActivityThread.java:935)                                                        在android.os.Handler.dispatchMessage(Handler.java:99)                                                        在android.os.Looper.loop(Looper.java:130)                                                        在android.app.ActivityThread.main(ActivityThread.java:3691)                                                        at java.lang.reflect.Method.invokeNative(Native Method)                                                        在java.lang.reflect.Method.invoke(Method.java:507)                                                        在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

请帮我解决这个问题

由于

1 个答案:

答案 0 :(得分:0)

请检查@frieza相关SO post中给出的解决方案是否有帮助。

根据建议,除了定义已过帐代码中显示的layout_heightlayout_width属性外,您可能还需要使用parent="android:Theme"设置父属性。

希望这也适合你。