gpt4 book ai didi

android - 在三星 Galaxy S 上调用 RingTonePreference 时出现 NullPointerException

转载 作者:塔克拉玛干 更新时间:2023-11-02 21:13:21 27 4
gpt4 key购买 nike

我在 Samsung Galaxy 上调用 RingTonePreference 时收到以下消息(在其他手机上一切正常):

java.lang.RuntimeException: Unable to start activity ComponentInfo{android/com.a
ndroid.internal.app.RingtonePickerActivity}: java.lang.NullPointerException
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
at android.app.ActivityThread.access$2300(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:85
8)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
at com.android.internal.app.RingtonePickerActivity.onPrepareListView(RingtonePic
kerActivity.java:252)
at com.android.internal.app.AlertController$AlertParams.createListView(AlertCont
roller.java:909)
at com.android.internal.app.AlertController$AlertParams.apply(AlertController.ja
va:824)
at com.android.internal.app.AlertActivity.setupAlert(AlertActivity.java:73)
at com.android.internal.app.RingtonePickerActivity.onCreate(RingtonePickerActivi
ty.java:226)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627)
... 11 more

更新:它是这样称呼的:

 <RingtonePreference android:key="pref_notification_ringTone"
android:title="@string/pref_notification_Ringtone"
android:ringtoneType="notification" android:showDefault="true"
android:showSilent="false" />

PS : 我知道已经有人问过类似的问题,但没有给出答案 ( https://stackoverflow.com/questions/5428768/notification-or-alarm-sound-picker-crash-on-galaxy-s/5872352#5872352 )

最佳答案

此问题已通过在定义中设置“showSilent=true”得到解决,显然是 Galaxy S 特有的错误。

关于android - 在三星 Galaxy S 上调用 RingTonePreference 时出现 NullPointerException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5874372/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com