react-native-android-location-enabler
react-native-android-location-enabler copied to clipboard
I am getting error in installing new version getting build failed
I am getting error in installing the new version of react-native-android-location-enabler v 2.0.1 . 1: Task failed with an exception.
- What went wrong: Execution failed for task ':react-native-android-location-enabler:compileDebugJavaWithJavac'.
error: invalid source release: 17
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================
2: Task failed with an exception.
-
What went wrong: java.lang.StackOverflowError (no error message)
-
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. ==============================================================================
Please help me as soon as possible thanks in advance.
I am facing the same issue. Please help here.
Same
Looks like owner update java version to 17 from this PR https://github.com/Richou/react-native-android-location-enabler/pull/92/files#diff-197b190e4a3512994d2cebed8aff5479ff88e136b8cc7a4b148ec9c3945bd65aR81-R82
its end up breaking react native stuff that still using 1.8 and implementation platform('org.jetbrains.kotlin:kotlin-bom:1.8.0') also break kotlin.
So I upload patch-package for fixing to able to build for now
+1
I am facing the same issue. Please help here.
downgrade your version react-native-android-location-enabler to @1.2.2
for usage :
import RNAndroidLocationEnabler from 'react-native-android-location-enabler';
async function checkLocation() {
if(Platform.OS === 'android') {
RNAndroidLocationEnabler.promptForEnableLocationIfNeeded({
interval : 1000,
fastInterval : 5000
})
.then(data => {
alert(location ${data})
})
.catch((error) => {
alert(error)
})
}
}
I hope this helps
I am facing the same issue 😔️
My environment:
- react-native: 0.72.7
- react-native-android-location-enabler: 2.0.1
java -version: openjdk version "17.0.10" 2024-01-16
Has anybody found a solution yet?
I am facing the same issue 😔️
My environment:
- react-native: 0.72.7
- react-native-android-location-enabler: 2.0.1
java -version: openjdk version "17.0.10" 2024-01-16Has anybody found a solution yet?
same here any solution?
I am facing the same issue 😔️ My environment:
- react-native: 0.72.7
- react-native-android-location-enabler: 2.0.1
java -version: openjdk version "17.0.10" 2024-01-16Has anybody found a solution yet?
same here any solution?
Well, I sort of figured out the problem myself. If you take a look at the installation instructions in this specific point and then check the content in the source folder, you'll notice that those files the docs are telling you to import no longer exist, because the maintainer updated the code from Java to Kotlin and forgot to update the docs.
In addition, that import is not required if you are using React Native 0.59+, as the dependencies will be auto-linked.
I hope it's gonna work for you 🙂️!