gpt4 book ai didi

android - 错误二进制 XML 文件行 #7 : Error inflating class com. esri.android.map.MapView

转载 作者:行者123 更新时间:2023-11-30 00:20:52 24 4
gpt4 key购买 nike

我设置了 ArcGIS Runtime SDK for Android 但运行时显示错误 二进制 XML 文件第 7 行:扩展类 com.esri.android.map.MapView 时出错由以下原因引起:java.lang.UnsatisfiedLinkError:未找到 long com.esri.android.map.MapSurface.nativeMapCreate(java.lang.String, int, int, float, boolean) 的实现(尝试了 Java_com_esri_android_map_MapSurface_nativeMapCreate 和 Java_com_esri_android_map_MapSurface_nativeMapCreate__Ljava_lang_String_2IIFZ )

还有我的代码

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'
}
}

还有我的 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;
}

最佳答案

看起来您正在使用 10.2.x 中的代码发布但正在导入 100.1.0在你的 gradle 脚本中发布。 API 在这些版本之间发生了变化。

关于android - 错误二进制 XML 文件行 #7 : Error inflating class com. esri.android.map.MapView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46305534/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com