Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

android deployment fails with INSTALL_FAILED_NO_MATCHING_ABI #1388

Open
twjobs2005 opened this issue Dec 21, 2024 · 1 comment
Open

android deployment fails with INSTALL_FAILED_NO_MATCHING_ABI #1388

twjobs2005 opened this issue Dec 21, 2024 · 1 comment
Assignees
Labels
bug Something isn't working correctly

Comments

@twjobs2005
Copy link

Describe the bug

Building on a Fedora Silverblue (linux, intel) system, targetting a Moto G6 with Android version 9, kernel 3.18.120...2020
.. FAILS with INSTALL_FAILED_NO_MATCHING_ABIS


Build machine (Linux Desktop):

$ uname -a
Linux fedora 6.11.8-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Nov 14 20:38:18 UTC 2024 x86_64 GNU/Linux


Building on Linux, trying to deploy on real android device...

$ core install android
xcrun xcodebuild -version
/tmp/gomobile-work-1036905224/lib/arm64-v8a/libCogent_Core_Gui.so: no symbols

adb install -r /var/home/.../bin/android/Cogent Core Gui.apk
Performing Streamed Install

adb: failed to install /var/home/.../bin/android/Cogent Core Gui.apk: Failure [INSTALL_FAILED_NO_MATCHING_ABIS: Failed to extract native libraries, res=-113]

core install failed: install: failed to run "adb install -r /var/home/.../bin/android/Cogent Core Gui.apk: exit status 1"

How to reproduce

just try to build this on linux (amd64) and deploy on Moto G6 (Android 9, arm?). It runs locally on the linux desktop, but not on the android device. Are there any target flags that I need to provide? (Love the project by the way!)

$ cat main.go
package main

import "cogentcore.org/core/core"

func main() {
	b := core.NewBody()
	core.NewButton(b).SetText("Hello, World!")
	b.RunMainWindow()
}

Example code

No response

Relevant output

No response

Platform

Android

@twjobs2005 twjobs2005 added the bug Something isn't working correctly label Dec 21, 2024
@github-project-automation github-project-automation bot moved this to Todo in Bugs Dec 21, 2024
@kkoreilly
Copy link
Member

Thank you for reporting this. This error message indicates that the architecture it is compiling for does not match the architecture of the Android device. The default target architecture is arm64, so I would just try these commands until one of them works:

core install android/arm
core install android/amd64
core install android/386

I will update the documentation to clarify the architecture behavior when compiling for mobile. Please also note that core build android makes a fat apk with all architectures included by default.

@kkoreilly kkoreilly self-assigned this Dec 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working correctly
Projects
Status: Todo
Development

No branches or pull requests

2 participants