<p dir="auto"><code class="notranslate">gomobile bind -target android</code> only generates an android/arm library, however many new phones such as the Nexus 5x are android/arm64. The generated libraries are incompatible and return an error when accessed.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="11-05 16:37:18.387  2581  2664 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
...
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:818)
11-05 16:37:18.387  2581  2664 E AndroidRuntime: Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file &quot;/data/app/co.myapp/base.apk&quot;],nativeLibraryDirectories=[/data/app/co.myapp/lib/arm64, /data/app/co.myapp/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find &quot;libgojni.so&quot;
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at java.lang.Runtime.loadLibrary(Runtime.java:367)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at java.lang.System.loadLibrary(System.java:1076)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at go.LoadJNI.&lt;clinit&gt;(LoadJNI.java:5)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at java.lang.Class.classForName(Native Method)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at java.lang.Class.forName(Class.java:324)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at java.lang.Class.forName(Class.java:285)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at go.Seq.&lt;clinit&gt;(Seq.java:23)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at go.mobilepgp.Mobilepgp.NewKeyPair(Mobilepgp.java:168)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at co.charge.messenger.util.EncryptionUtil$GenerateKeyTask.doInBackground(EncryptionUtil.java:140)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at co.charge.messenger.util.EncryptionUtil$GenerateKeyTask.doInBackground(EncryptionUtil.java:117)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at android.os.AsyncTask$2.call(AsyncTask.java:295)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    ... 4 more"><pre class="notranslate"><code class="notranslate">11-05 16:37:18.387  2581  2664 E AndroidRuntime: FATAL EXCEPTION: AsyncTask #2
...
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at java.lang.Thread.run(Thread.java:818)
11-05 16:37:18.387  2581  2664 E AndroidRuntime: Caused by: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/co.myapp/base.apk"],nativeLibraryDirectories=[/data/app/co.myapp/lib/arm64, /data/app/co.myapp/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]] couldn't find "libgojni.so"
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at java.lang.Runtime.loadLibrary(Runtime.java:367)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at java.lang.System.loadLibrary(System.java:1076)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at go.LoadJNI.&lt;clinit&gt;(LoadJNI.java:5)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at java.lang.Class.classForName(Native Method)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at java.lang.Class.forName(Class.java:324)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at java.lang.Class.forName(Class.java:285)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at go.Seq.&lt;clinit&gt;(Seq.java:23)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at go.mobilepgp.Mobilepgp.NewKeyPair(Mobilepgp.java:168)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at co.charge.messenger.util.EncryptionUtil$GenerateKeyTask.doInBackground(EncryptionUtil.java:140)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at co.charge.messenger.util.EncryptionUtil$GenerateKeyTask.doInBackground(EncryptionUtil.java:117)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at android.os.AsyncTask$2.call(AsyncTask.java:295)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    at java.util.concurrent.FutureTask.run(FutureTask.java:237)
11-05 16:37:18.387  2581  2664 E AndroidRuntime:    ... 4 more
</code></pre></div>
<p dir="auto">Gomobile saves libgojni.so under armeabi-v7a but probably should compile android/arm64 and place under arm64-v8a.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="~/p/c/m/b/lib» tree                                                                                             e2ee!?
.
├── arm64-v8a
│   └── libgif.so
├── armeabi
│   └── libgif.so
├── armeabi-v7a
│   ├── libgif.so
│   ├── libgojni.so
│   ├── librsjni.so
│   └── libRSSupport.so
├── mips
│   ├── libgif.so
│   ├── librsjni.so
│   └── libRSSupport.so
├── mips64
│   └── libgif.so
├── x86
│   ├── libgif.so
│   ├── librsjni.so
│   └── libRSSupport.so
└── x86_64
    └── libgif.so

7 directories, 14 files"><pre class="notranslate"><code class="notranslate">~/p/c/m/b/lib» tree                                                                                             e2ee!?
.
├── arm64-v8a
│   └── libgif.so
├── armeabi
│   └── libgif.so
├── armeabi-v7a
│   ├── libgif.so
│   ├── libgojni.so
│   ├── librsjni.so
│   └── libRSSupport.so
├── mips
│   ├── libgif.so
│   ├── librsjni.so
│   └── libRSSupport.so
├── mips64
│   └── libgif.so
├── x86
│   ├── libgif.so
│   ├── librsjni.so
│   └── libRSSupport.so
└── x86_64
    └── libgif.so

7 directories, 14 files
</code></pre></div>
<p dir="auto">Android doesn't only run on arm-based systems but also some other architectures are commonly used, such as x86 (mostly Intel Atom, but also the simulators) arm64 (also known as aarch64) and MIPS.</p>
<p dir="auto">It would be great if at least x86 was supported.</p>