Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Map not displaying on Android Device #202

Closed
manrajgrover opened this issue Apr 29, 2016 · 8 comments
Closed

Map not displaying on Android Device #202

manrajgrover opened this issue Apr 29, 2016 · 8 comments

Comments

@manrajgrover
Copy link

Not able to display Map on Android Device. I haven't tried it on emulator but will do and update the issue.

Chrome Debugger has this output.

ExceptionsManager.js:76Warning: Native component for "AIRMapMarker" does not exist
ExceptionsManager.js:76 Warning: Native component for "AIRMapPolyline" does not exist
ExceptionsManager.js:76 Warning: Native component for "AIRMapPolygon" does not exist
ExceptionsManager.js:76 Warning: Native component for "AIRMapCircle" does not exist
ExceptionsManager.js:76 Warning: Native component for "AIRMapCallout" does not exist
ExceptionsManager.js:76 Warning: Native component for "AIRMap" does not exist
AppRegistry.js:82 Running application "uiexp" with appParams: {"initialProps":{},"rootTag":1}. __DEV__ === true, development-level warning are ON, performance optimizations are OFF
root.js:33 here!
root.js:43 ListViewDataSource {_dataBlob: null, _dirtyRows: Array[0], _dirtySections: Array[0], _cachedRowCount: 0, rowIdentities: Array[0]…}
root.js:61 Maps

Let me know if source code is required.

@jrichardlai
Copy link
Contributor

Hello, can you double check that the library is linked and installed properly? It seems that it can't find the native components.

@manrajgrover
Copy link
Author

My bad! I missed a line, hence resulting to this. Thank you! :)

@Jaafar-abusair
Copy link

which line you missed I have the same problem

@Denys-Bushulyak
Copy link

Have the same problem and all checked several times but unsuccessful.

@Jaafar-abusair
Copy link

The solution is simple but not mentioned in the tutorial, you need to return the map package in your main android activity, same place where you return the react native packages

@Denys-Bushulyak
Copy link

Denys-Bushulyak commented Oct 27, 2016

The solution is simple but not mentioned in the tutorial, you need to return the map package in your main android activity, same place where you return the react native packages

Please, little bit more about this if you may!

@Jaafar-abusair
Copy link

Im sorry I don't have the code right now, but in the Android project in the Application.java class there is a method returning Array, inside this. Method you should return the map package

@Override
protected List<ReactPackage> getPackages() {
  return Arrays.<ReactPackage>asList(
    new MainReactPackage()
  );
}

@Denys-Bushulyak
Copy link

Denys-Bushulyak commented Oct 27, 2016

@Jaafar-abusair , thank you very much for so fast help and you spent time - you helped me!
My code:

import com.airbnb.android.react.maps.MapsPackage;
@Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
          new MapsPackage()
      );
    }
  };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants