2017-09-19 1 views
1

Ich legte ArcGIS Runtime SDK für Android, aber führen show Fehler Binär XML-Datei Zeile # 7: Fehler beim Aufblasen der Klasse com.esri.android .map.MapView verursacht durch: java.lang.UnsatisfiedLinkError: keine Implementierung für lange com.esri.android.map.MapSurface.nativeMapCreate gefunden (java.lang.String, int, int, float, boolean) (versucht Java_com_esri_android_map_MapSurface_nativeMapCreate und Java_com_esri_android_map_MapSurface_nativeMapCreate__Ljava_lang_String_2IIFZ mein Code)Fehler binäre XML-Datei Zeile # 7: Fehler beim Aufblasen der Klasse com.esri.android.map.MapView

Und

dependencies { 
compile fileTree(include: ['*.jar'], dir: 'libs') 
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
    exclude group: 'com.android.support', module: 'support-annotations' 
}) 
compile 'org.slf4j:slf4j-api:1.7.25' 
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" 
compile 'com.android.support:appcompat-v7:25.3.1' 
compile 'com.android.support:design:25.3.1' 
compile 'com.google.android.gms:play-services-maps:11.0.4' 
compile 'com.android.support:recyclerview-v7:25.3.1' 
compile 'com.android.support:support-v4:25.3.1' 
compile 'pl.bclogic:pulsator4droid:1.0.3' 
compile 'com.esri.arcgisruntime:arcgis-android:100.1.0' 
compile 'com.android.support.constraint:constraint-layout:1.0.2' 
compile 'com.makeramen:roundedimageview:2.3.0' 
testCompile 'junit:junit:4.12' 

} 
repositories { 
    mavenCentral() 
} 
android { 
    packagingOptions { 
     exclude 'META-INF/LGPL2.1' 
     exclude 'META-INF/DEPENDENCIES' 
     exclude 'META-INF/NOTICE' 
     exclude 'META-INF/LICENSE' 
     exclude 'META-INF/LICENSE.txt' 
     exclude 'META-INF/NOTICE.txt' 
    } 
} 

Und mein Fragment

@Override 
public View onCreateView(LayoutInflater inflater, ViewGroup container, 
         Bundle savedInstanceState) { 
    // Inflate the layout for this fragment 
    View view = inflater.inflate(R.layout.fragment_map, container, false); 
    mMapView = (MapView) view.findViewById(R.id.map); 
    try { 
     shapefileTable = new ShapefileFeatureTable("file:///android_asset/yourPath/vietnam.shp"); 
    } catch (FileNotFoundException e) { 
     e.printStackTrace(); 
    } 
    FeatureLayer featureLayer = new FeatureLayer(shapefileTable); 

    UniqueValueRenderer uvRenderer = new UniqueValueRenderer(); 
    uvRenderer.setDefaultSymbol(new SimpleFillSymbol(R.color.colorPrimary, null)); 
    // set renderer 
    featureLayer.setRenderer(uvRenderer); 
    mMapView.addLayer(featureLayer); 
    return view; 
} 
+0

Bitte geben Sie Ihre XML hier. –

Antwort

1

Es sieht aus wie Sie Code aus der 10.2.x Release verwenden, aber die 100.1.0 Veröffentlichung in Ihrem gradle Skript importieren. Die API wird zwischen diesen Versionen geändert.

+0

hier mein Import Kompilierung ‚com.esri.arcgisruntime: arcgis-android: 100.1.0‘, aber nicht –

+1

genau funktioniert, aber der Code, den Sie im Snippet hat gehört zur 10.2.x-Release. Um diesen Code zu verwenden, müssen Sie kompilieren 'com.esri.arcgis.android:arcgis-android:10.2.9' Wenn Sie die Version 100.1.0 verwenden möchten, hat die API geändert und den Code, den Sie dort haben ist nicht länger gültig. – falldownhill

Verwandte Themen