This version updates the library to support JVM target 17, resolving compatibility issues with modern React Native and Android development environments.
- JVM Target: Updated from 11 to 17
- Android Gradle Plugin: Updated to 8.0.2
- Kotlin Plugin: Updated to 1.9.22
- Compile SDK: Updated to 34
- Target SDK: Updated to 34
- React Native: Updated to 0.73.0
If you're experiencing build issues while waiting for this update, add this to your project's android/build.gradle (in the root of your React Native project):
// Add this at the bottom of your android/build.gradle file
subprojects {
afterEvaluate { project ->
if (project.hasProperty('android')) {
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_17
targetCompatibility JavaVersion.VERSION_17
}
}
}
if (project.hasProperty('kotlin')) {
tasks.withType(org.jetbrains.kotlin.gradle.tasks.KotlinCompile).configureEach {
kotlinOptions {
jvmTarget = "17"
}
}
}
}
}Update to the latest version:
npm install react-native-gnss-status-checker@latest
# or
yarn add react-native-gnss-status-checker@latestMake sure your development environment supports:
- Java: JDK 17 or higher
- Android Gradle Plugin: 8.0.0 or higher
- Kotlin: 1.8.0 or higher
- React Native: 0.70.0 or higher
This update should be backward compatible, but if you encounter issues:
-
Clean your build:
cd android && ./gradlew clean && cd .. npx react-native run-android
-
Update your Android project:
- Ensure your main
android/build.gradleuses Android Gradle Plugin 8.0+ - Set JVM target to 17 in your app's
android/app/build.gradle
- Ensure your main
-
Check Java version:
java -version # Should show version 17 or higher
After updating, verify the installation:
import { GnssStatusChecker } from 'react-native-gnss-status-checker';
// Check if everything works
GnssStatusChecker.getGNSSStatus()
.then(status => {
console.log('GNSS Status:', status);
console.log('API Level:', status.apiLevel);
console.log('Supports CN0:', status.supportsCn0);
})
.catch(error => {
console.error('Error:', error);
});If you encounter issues after upgrading:
- Check that your Android environment supports JDK 17
- Clean and rebuild your project
- Verify React Native version compatibility
- Open an issue on GitHub
No code changes required - this is purely an infrastructure update for better compatibility with modern development environments.