react-native-android-location-enabler icon indicating copy to clipboard operation
react-native-android-location-enabler copied to clipboard

I am getting error in installing new version getting build failed

Open meta-utkarsh-ahuja opened this issue 2 years ago • 9 comments

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.

meta-utkarsh-ahuja avatar Oct 30 '23 12:10 meta-utkarsh-ahuja

I am facing the same issue. Please help here.

ankitagnihotri avatar Oct 30 '23 14:10 ankitagnihotri

Same

VadimZP avatar Nov 14 '23 12:11 VadimZP

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

react-native-android-location-enabler+2.0.1.patch

zeemyself avatar Nov 21 '23 12:11 zeemyself

+1

renishdeveloper avatar Nov 28 '23 13:11 renishdeveloper

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

pakAsrul avatar Dec 07 '23 04:12 pakAsrul

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?

luizaugustoventura avatar Mar 09 '24 02:03 luizaugustoventura

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?

same here any solution?

oguzydz avatar Mar 13 '24 09:03 oguzydz

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?

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 🙂️!

luizaugustoventura avatar Apr 02 '24 02:04 luizaugustoventura