Select to view content in your preferred language

In Android Studio after that, when building apk the app name becomes the "Android API"

2822
8
Jump to solution
10-20-2017 07:41 AM
AnatolyTorbov
Emerging Contributor

In Android Studio in gradle I set
dependencies {
compile 'com.esri.arcgisruntime:arcgis-android:100.1.0'
}

After that, when building apk the app name becomes the Android API, instead of its own name.
How to fix it?

0 Kudos
1 Solution

Accepted Solutions
AlexanderNohe1
Honored Contributor

Hello Anatoly Torbov‌,

From what I noticed, it looks like the Honor 8 Pro is a 64 bit operating system whereas the Samsung Note2 is a 32 bit operating system. This means that potentially, one of you libraries is not 64 bit compatible.  Either all libraries need to run with their 64 bit library or all need to run with their 32 bit library.  You can find a stack overflow resolution at the following link that will help you configure your project to run with the 32 bit libraries.

How to use 32-bit native libraries on 64-bit Android device - Stack Overflow 

I hope this helps!

Thanks,

Alexander

View solution in original post

8 Replies
AlexanderNohe1
Honored Contributor

Hi Anatoly Torbov‌,

We are aware of this issue.  Two things to try to circumvent this problem:

1) Add tools:replace="android:label" in the application tag of the Manifest file (Updating version 100.1.0 cause app name change to Android API · Issue #372 · Esri/arcgis-runtime-sam... )

2) Change your app_name string resource to a different name such as my_app_name and change the string resource referenced in the Manifest file to this.

I hope this helps!

AnatolyTorbov
Emerging Contributor

Unfortunately it works only with English language on the device.

But if use 

compile 'com.esri.arcgisruntime:arcgis-android:100.0.0'

the problem disappears

0 Kudos
AlexanderNohe1
Honored Contributor

Did you try the above suggestions?  Did those not work for you?  Can you post your Manifest file?

AnatolyTorbov
Emerging Contributor

Thank you for your help.
Yes. I tried. This only works if gradle specifies version 100.0.0.


But it seems I have a worse problem.
My project runs on Android 4.4.4 (SDK19), Samsung Note2.
But in Android 7 (Honor 8 Pro) does not work. Crash is already on setContentView ().
I attach the the log.

------ log -----

AndroidRuntime: FATAL EXCEPTION: main
Process: , PID: 27492
java.lang.RuntimeException: Unable to start activity ComponentInfo{topoSK42/topoSK42.Activity_EsriMap}:
android.view.InflateException: Binary XML file line #9: Binary XML file line #9: Error inflating class com.esri.arcgisruntime.mapping.view.MapView
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2793)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6577)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
Caused by: android.view.InflateException: Binary XML file line #9: Binary XML file line #9: Error inflating class com.esri.arcgisruntime.mapping.view.MapView
Caused by: android.view.InflateException: Binary XML file line #9: Error inflating class com.esri.arcgisruntime.mapping.view.MapView
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.newInstance0(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:430)
at android.view.LayoutInflater.createView(LayoutInflater.java:656)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:798)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:738)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:869)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:832)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at android.view.LayoutInflater.inflate(LayoutInflater.java:377)
at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:454)
at com.android.internal.policy.HwPhoneWindow.setContentView(HwPhoneWindow.java:290)
at android.app.Activity.setContentView(Activity.java:2515)
at trbw.topoSK42.Activity_EsriMap.onCreate(Activity_EsriMap.java:80)
at android.app.Activity.performCreate(Activity.java:6910)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2746)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2864)
at android.app.ActivityThread.-wrap12(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1567)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:156)
at android.app.ActivityThread.main(ActivityThread.java:6577)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:942)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:832)
10-25 22:41:00.112 27492-27492/? E/AndroidRuntime: Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/trbw.topoSK42-2/base.apk", zip file "/data/app/trbw.topoSK42-2/split_lib_dependencies_apk.apk", zip file "/data/app/topoSK42-2/split_lib_slice_0_apk.apk", zip file "/data/app/.topoSK42-2/split_lib_slice_1_apk.apk", zip file "/data/app/topoSK42-2/split_lib_slice_2_apk.apk", zip file "/data/app/.topoSK42-2/split_lib_slice_3_apk.apk", zip file "/data/app/.topoSK42-2/split_lib_slice_4_apk.apk", zip file "/data/app/.topoSK42-2/split_lib_slice_5_apk.apk", zip file "/data/app/.topoSK42-2/split_lib_slice_6_apk.apk", zip file "/data/app/topoSK42-2/split_lib_slice_7_apk.apk", zip file "/data/app/.topoSK42-2/split_lib_slice_8_apk.apk", zip file "/data/app/trbw.topoSK42-2/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/trbw.topoSK42-2/lib/arm64, /data/app/trbw.topoSK42-2/base.apk!/lib/arm64-v8a, /data/app/trbw.topoSK42-2/split_lib_dependencies_apk.apk!/lib/arm64-v8a, /data/app/trbw.topoSK42-2/split_lib_slice_0_apk.apk!/lib/arm64-v8a, /data/app/trbw.topoSK42-2/split_lib_slice_1_apk.apk!/lib/arm64-v8a, /data/app/trbw.topoSK42-2/split_lib_slice_2_apk.apk!/lib/arm64-v8a, /data/app/trbw.topoSK42-2/split_lib_slice_3_apk.apk!/lib/arm64-v8a, /data/app/trbw.topoSK42-2/split_lib_slice_4_apk.apk!/lib/arm64-v8a, /data/app/trbw.topoSK42-2/split_lib_slice_5_apk.apk!/lib/arm64-v8a, /data/app/trbw.topoSK42-2/split_lib_slice_6_apk.apk!/lib/arm64-v8a, /data/app/trbw.topoSK42-2/split_lib_slice_7_apk.apk!/lib/arm64-v8a, /data/app/trbw.topoSK42-2/split_lib_slice_8_apk.apk!/lib/arm64-v8a, /data/app/trbw.topoSK42-2/split_lib_slice_9_apk.apk!/lib/arm64-v8a, /system/lib64, /vendor/lib64, /system/vendor/lib64, /product/lib64]]] couldn't find "libruntimecore_java.so"
at java.lang.Runtime.loadLibrary0(Runtime.java:989)
at java.lang.System.loadLibrary(System.java:1533)
at com.esri.arcgisruntime.ArcGISRuntimeEnvironment.a(SourceFile:183)
at com.esri.arcgisruntime.ArcGISRuntimeEnvironment.initialize(SourceFile:162)
at com.esri.arcgisruntime.internal.jni.CoreDevice.<clinit>(SourceFile:35)
at com.esri.arcgisruntime.internal.jni.CoreDevice.b(SourceFile:81)
at com.esri.arcgisruntime.mapping.view.MapView.<init>(SourceFile:331)
... 26 more

0 Kudos
AnatolyTorbov
Emerging Contributor

I need to clarify about Android 7.
In a simple test project, everything works.

In the working project:

      switch (iMapService) {
         case GOOGLE: {
               // ok
                  ....
            }
            case YANDEX: {
               // ok ...
               //use yandexmapkit 2.5.2
                  ...
            }
            case ARCGIS: {
                  // oops  😞
                   //crash on first operator using ArcGIS on Android 7
                   ArcGISRuntimeEnvironment.setLicense("runtimelite,1000,rud9623657619,none,*****");
            }
   }

But it works  on Android 4.4.4 (SDK19), Samsung Note2.
On Android 7 (Honor 8 Pro) does not work.

0 Kudos
AlexanderNohe1
Honored Contributor

Hello Anatoly Torbov‌,

From what I noticed, it looks like the Honor 8 Pro is a 64 bit operating system whereas the Samsung Note2 is a 32 bit operating system. This means that potentially, one of you libraries is not 64 bit compatible.  Either all libraries need to run with their 64 bit library or all need to run with their 32 bit library.  You can find a stack overflow resolution at the following link that will help you configure your project to run with the 32 bit libraries.

How to use 32-bit native libraries on 64-bit Android device - Stack Overflow 

I hope this helps!

Thanks,

Alexander

AnatolyTorbov
Emerging Contributor

Alexander!

Thanks!

The hint about the usage of the 64 bit library helped 

0 Kudos
AlexanderNohe1
Honored Contributor

Awesome!  Glad you got rolling.  This is a tricky scenario that is occasionally run into.