rnmapbox / maps

A Mapbox react native module for creating custom maps
MIT License
2.22k stars 838 forks source link

i tried to install map box in my react native project it shows like "Native part of Mapbox React Native libraries were not registered properly, double check our native installation guides." i installed in a way which is mention in documentation #807

Closed jsathu07 closed 4 years ago

label-actions[bot] commented 4 years ago

:wave: @jsathu, please respect our issue template - required fields are missing.

doylemark commented 4 years ago

Did you solve this?

jsathu07 commented 4 years ago

nope

On Wed, Apr 29, 2020 at 4:43 AM doyle-mark notifications@github.com wrote:

Did you solve this?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/react-native-mapbox-gl/maps/issues/807#issuecomment-620902521, or unsubscribe https://github.com/notifications/unsubscribe-auth/AORR5OKCSJLFUXCNJZOAADTRO5PIRANCNFSM4MEQLKMA .

awind commented 4 years ago

Maybe this will help you https://stackoverflow.com/questions/58397237/react-native-mapbox-issue/62318576#62318576

alexis-regnaud commented 3 years ago

I have the same issue with the latest version of react-native-mapbox-gl

usman22-afaq commented 3 years ago

I have the same issue with the latest version of react-native-mapbox-gl

can you find the solution?

ferdicus commented 3 years ago

There are literally hundreds of devs who are using this lib and are not reporting this issue. Please follow the instructions in the issue template and open a new ticket if you still encounter this problem.

We can not help you with this little information on the issue.

zifahm commented 3 years ago

There are literally hundreds of devs who are using this lib and are not reporting this issue. Please follow the instructions in the issue template and open a new ticket if you still encounter this problem.

We can not help you with this little information on the issue.

Sorry about that, I should Have said something when things started working,

I installed wix react native navigation first then Installed mapbox gl and then things didnt work properly, by inversing the order of installs, things seem to work like a charm.

If your installing it after instlaling react native navigtion by wix then it would be better of starting a project using expo's create react native app would give you intended results.

Moonubanna commented 3 years ago

Hello, I'm facing same problem(console.error native part of Mapbox react native libraries were not registered properly. double check our native installation guides.). anyone suggest what I do.

Thanks

ferdicus commented 3 years ago

On which version of RN are y'all?
The installation guide only applies to version 0.6x and higher.
If you have a version below that, you need to follow the manual installation steps.

borshevsky commented 3 years ago

Have same issue on RN 0.63

AKACC commented 3 years ago

I encounter this problem differently on IOS and Android, please make sure you are able to find the followings in your project: env: "react-native": "^0.60.5", "@react-native-mapbox-gl/maps": "^8.1.0",

IOS & Android: make sure you called MapboxGL.setAccessToken(yourAccessToken)

Autolink never works for me on Android, so I have to do manually:

  1. in android/settings.gradle, add this
      include ':rctmgl'
      project(':rctmgl').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-mapbox-gl/maps/android/rctmgl')
  2. in android/app/build.gradle, add this
    dependencies {
        ...
        implementation project(':rctmgl')
    }
  3. in MainApplication.java, add this

    import com.mapbox.rctmgl.RCTMGLPackage;

     protected List<ReactPackage> getPackages() {
            // Add additional packages you require here
            // No need to add RnnPackage and MainReactPackage
           return Arrays.<ReactPackage>asList(
               ...
               new RCTMGLPackage() <-Add this
           );
       }  

Hopefully this can help.

Florian-crg commented 3 years ago

Same here. ERROR Native part of Mapbox React Native libraries were not registered properly, double check our native installation guides.

ferdicus commented 3 years ago

did you?

forestman27 commented 2 years ago

I'm experiencing this issue. I copied and pasted everything from the repo on github react-native-mapbox-gl/maps I'm using node v16.13.0. "dependencies": { "@react-native-mapbox-gl/maps": "^8.5.0", "expo": "~44.0.0", "expo-status-bar": "~1.2.0", "react": "17.0.1", "react-dom": "17.0.1", "react-native": "0.64.3", "react-native-web": "0.17.1" }

maurosoppelsa commented 2 years ago

Any solution for this issue? I'm facing the same with the latest version of Mapbox and expo: "@rnmapbox/maps": "github:rnmapbox/maps#main", "expo": "^45.0.6", "react": "17.0.2", "react-native": "0.68.2"

amine-abdelli commented 1 year ago

Same here :'(

amine-abdelli commented 1 year ago

I encounter this problem differently on IOS and Android, please make sure you are able to find the followings in your project: env: "react-native": "^0.60.5", "@react-native-mapbox-gl/maps": "^8.1.0",

IOS & Android: make sure you called MapboxGL.setAccessToken(yourAccessToken)

Autolink never works for me on Android, so I have to do manually:

  1. in android/settings.gradle, add this
include ':rctmgl'
project(':rctmgl').projectDir = new File(rootProject.projectDir, '../node_modules/@react-native-mapbox-gl/maps/android/rctmgl')
  1. in android/app/build.gradle, add this
dependencies {
    ...
    implementation project(':rctmgl')
}
  1. in MainApplication.java, add this

import com.mapbox.rctmgl.RCTMGLPackage;

 protected List<ReactPackage> getPackages() {
        // Add additional packages you require here
        // No need to add RnnPackage and MainReactPackage
       return Arrays.<ReactPackage>asList(
           ...
           new RCTMGLPackage() <-Add this
       );
   }  

Hopefully this can help.

Did you finally managed to sort this out ?