代码正常工作,但是在我将api更改为29之后,它显示了一些我无法解决的错误

时间:2019-09-12 00:20:13

标签: preferences androidx

我想在我的应用程序中启用深色主题,但之前可以正常工作的代码现在无法正常工作

重写onCreatePreferences(savedInstanceState:Bundle ?, rootKey:String?){         setPreferencesFromResource(R.xml.preference_screen,rootKey)         preferenceHelper = PreferenceHelper(上下文!!)

#!/usr/bin/expect -f
source home/tests/library.tcl
set openapp [runapp]
eval spawn $openapp
set id $spawn_id
login
puts [exec home/tests/testsuite/abc $id]
expect eof

重写onCreatePreferences(savedInstanceState:Bundle ?, rootKey:String?){         setPreferencesFromResource(R.xml.preference_screen,rootKey)         preferenceHelper = PreferenceHelper(上下文!!)

#!/usr/bin/expect -f
sourcehome/tests/library.tcl
puts 2ndscript
set bbb [lindex $argv 0]
puts $bbb
send -i $bbb "t\r"
expect eof


val switchPreferenceCompat = findPreference(getString(R.string.key_darkTheme))

此行显示错误

0 个答案:

没有答案