Skip to content
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

Support minSdk version 24 #83

Closed
jeongth9446 opened this issue Nov 2, 2022 · 2 comments
Closed

Support minSdk version 24 #83

jeongth9446 opened this issue Nov 2, 2022 · 2 comments

Comments

@jeongth9446
Copy link
Contributor

First of all thank you for open-sourcing such a great library.

My application is needed to setup in Android Nougat(SDK 24)
However, the library seems to be running from SDK 26 and above.
It seems that the date-related classes (DayOfWeek, etc.) have SDK 26 dependency.

Is it possible to support SDK 24 by modifying that?
image

@jeongth9446
Copy link
Contributor Author

When below code applied, your library work well in lower version SDK!

I think it would be good to add the code below to the readme.

android {
defaultConfig {
// Required ONLY if your minSdkVersion is below 21
multiDexEnabled true
}

compileOptions {
// Enable support for the new language APIs
coreLibraryDesugaringEnabled true
// Set compatibility to Java 8 (can be higher if desired)
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}

kotlinOptions {
// Also add this for Kotlin projects
jvmTarget = "1.8"
}
}

dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:'
}

@boguszpawlowski
Copy link
Owner

Hi @jeongth9446! Sorry that it took me so long to answer this. I think adding a reference is a good idea, however, I would only add a link to an official documentation: https://developer.android.com/studio/write/java8-support. IMO, setup section would be the best place for it. If you want to submit a PR, feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants