-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare for SDK 34 #376
Comments
According to this: https://developer.android.com/reference/kotlin/android/content/SharedPreferences.OnSharedPreferenceChangeListener Changing the following line in both override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String) { to override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String?) { But then: e: file:///C:/BCR/app/src/main/java/com/chiller3/bcr/settings/SettingsFragment.kt:218:37 Type mismatch: inferred type is String? but String was expected |
Thanks for starting to look into this! I haven't tested, but it's probably because override fun onSharedPreferenceChanged(sharedPreferences: SharedPreferences, key: String?) {
when {
key == null -> return
// ... Regarding API 34, I'm thinking of updating in two phases, Also, I won't be merging any API 34-related PRs until the source code is released in AOSP. In the past, the early SDK releases have had a proprietary license. I don't know if that's still the case because I couldn't find a license file for 34, but I'd rather play it safe. |
Exactly. I did that and rebased my PR. I think it can be merged because it makes the code safer and successfully compiles with previous SDKs though. |
Agreed and merged. Thanks! |
Signed-off-by: Andrew Gunnerson <accounts+github@chiller3.com>
Android SDK 34 is already stable. When setting CompileSdkVersion to 34, build failes with errors below.
Changed also AGP to v8.2.0-alpha10 and buildToolsVersion to 34.0.0, although buildToolsVersion does not matter here.
Few other apps compiled successfully, so most probably it isn't SDK issue. Something may have changed but I can't figure out what in this case.
The text was updated successfully, but these errors were encountered: