Richou / react-native-android-location-enabler

Display a GoogleMap like android popup to ask for user to enable location services if disabled
MIT License
202 stars 51 forks source link

I am getting error in installing new version getting build failed #102

Open meta-utkarsh-ahuja opened 10 months ago

meta-utkarsh-ahuja commented 10 months ago

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.

2: Task failed with an exception.

Please help me as soon as possible thanks in advance.

ankitagnihotri commented 10 months ago

I am facing the same issue. Please help here.

VadimZP commented 10 months ago

Same

zeemyself commented 9 months ago

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

renishdeveloper commented 9 months ago

+1

pakAsrul commented 9 months ago

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

luizaugustoventura commented 6 months ago

I am facing the same issue 😔️

My environment:

Has anybody found a solution yet?

oguzydz commented 6 months ago

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?

luizaugustoventura commented 5 months ago

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

AlimKhan76 commented 4 months ago

Anyone found the solution to this ??