davidgalindo / react-native-arcgis-mapview

A basic ArcGIS port for React Native.
MIT License
48 stars 24 forks source link

Linking improperly on Android #5

Closed hzbarkan closed 5 years ago

hzbarkan commented 5 years ago

Linking this project using react-native-link returns Android module "react-native-arcgis-mapview" has been successfully linked and re-linking returns Android module "react-native-arcgis-mapview" is already linked as expected. But it's not actually linked since it does not implemented in app/build.gradle and not even included in settings.gradle and not even imported in MainApplication.java , and doing all of those myself still returns me this error:

Binary XML file line #6: Binary XML file line #6: Error inflating class <unknown>

null

com.esri.arcgisruntime.internal.jni.CoreMapView

Here's what i did in MainApplication.java :

+ import com.davidgalindo.rnarcgismapview.RNArcGISMapViewPackage;
...
@Override
    protected List<ReactPackage> getPackages() {
      return Arrays.<ReactPackage>asList(
          new MainReactPackage(),
+          new RNArcGISMapViewPackage(),
    ...
    }

Here's on settings.gradle :

+ include ':react-native-arcgis-mapview'
+ project(':react-native-arcgis-mapview').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-arcgis-mapview/android')

On app/build.gradle :

dependencies {
+    implementation project(':react-native-arcgis-mapview')
      ...
}

On build.gradle

allprojects {
    repositories {
        ...
+        maven {
+            url "https://esri.bintray.com/arcgis"
+        }
        ...
}

Environment: "react-native": "0.59.10", "react-native-arcgis-mapview": "^1.0.11", MacOS X Mojave