Richou / react-native-android-location-enabler

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

Can't compile #2

Closed ghost closed 7 years ago

ghost commented 7 years ago

Hello,

I just added your plugin into my project, but i can't compile it

/Users/mad/Documents/HangoverApp/node_modules/react-native-android-location-enabler/android/src/main/java/com/heanoria/library/reactnative/locationenabler/RNAndroidLocationEnablerModule.java:36: error: RNAndroidLocationEnablerModule is not abstract and does not override abstract method onNewIntent(Intent) in ActivityEventListener public class RNAndroidLocationEnablerModule extends ReactContextBaseJavaModule implements GoogleApiClient.ConnectionCallbacks, GoogleApiClient.OnConnectionFailedListener, ResultCallback<LocationSettingsResult>, ActivityEventListener { ^ /Users/mad/Documents/HangoverApp/node_modules/react-native-android-location-enabler/android/src/main/java/com/heanoria/library/reactnative/locationenabler/RNAndroidLocationEnablerModule.java:122: error: method does not override or implement a method from a supertype @Override ^ 2 errors

it's on ResultCallback and the Override of onActivityResult()

I used react-native link, but checked the code with your manual setup's step and it's the same...

(I use the i18n plugin, fbsdk plugin too, maybe it's doing a conflict, don't know)

android sdk 25

Thank you in advance

ghost commented 7 years ago

Resolved, using 1.0.2 and now it's working

Richou commented 7 years ago

Ok, but it still not normal, I will check it as soon as possible, thx for your issue.

Keksike commented 7 years ago

I'm experiencing same problem, using:

react-native@0.44.3
react@16.0.0-alpha.6
Richou commented 7 years ago

Yes sorry for that, I still did not check that. Did you try to use the version 1.0.2 ?

Richou commented 7 years ago

I published a new release version 1.0.4, can you test and tell me if that corrected your issue ? Thx.

jamesalways commented 7 years ago

@Richou Hi! Same problem. 1.0.4 didn't resolve it. With 1.0,2 works! Please fix it in newer versions!

Thanks!!!

urska19 commented 7 years ago

Hi.

I installed the latest version1.0.4 using react-native 0.44.0 and got the following error :

.../node_modules/react-native-android-location-enabler/android/src/main/java/com/heanoria/library/reactnative/locationenabler/RNAndroidLocationEnablerPackage.java:13: error: RNAndroidLocationEnablerPackage is not abstract and does not override abstract method createJSModules() in ReactPackage
public class RNAndroidLocationEnablerPackage implements ReactPackage {
       ^
1 error

If I understand correctly in the newest version of react 0.47., method createJSModules()was removed, which I guess is now an issue for older versions of react-native, when installing version 1.0.4 of this package.

Fix, that worked for me, was to add following in RNAndroidLocationEnablerPackage.java

     @Override
     public List<Class<? extends JavaScriptModule>> createJSModules() {
       return Collections.emptyList();
     }
Richou commented 7 years ago

I released a new version 1.0.5, please tell me if that fixed your issue. thx.

akshita-2505 commented 3 years ago

Screenshot 2021-05-04 at 3 04 43 PM

version: 1.2.2 Facing this issue, Please look into this @Richou