Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ADB0020: Android ABI mismatch. How do I set ABI of target physical device?

Tags:

I have a brand new Samsung A10 with Pie on it.

I'm attempting to run the Sample Application provided in MediaPlugin: https://github.com/jamesmontemagno/MediaPlugin

At first I was getting this error when I tried to build:

Invalid value 'armeabi' in $(AndroidSupportedAbis). This ABI is no longer supported. Please update your project properties to remove the old value. If the properties page does not show an 'armeabi' checkbox, un-check and re-check one of the other ABIs and save the changes.

Then I did some reasearch and went to Android Properties / Android Options / Advanced and unselected armeabo-v7a.

As I understand it this will remove 32 but support, which I'm fine with.

Now I get this error:

ADB0020: Android ABI mismatch. You are deploying an app supporting 'x86;x86_64;arm64-v8a' ABIs to an incompatible device of ABI 'armeabi-v7a;armeabi'. You should either create an emulator matching one of your app's ABIs or add 'armeabi-v7a' to the list of ABIs your app builds for.

I'm targeting a new A10 Samsung phone with Android Pie on it. I can't see where to set the 'device ABI', though why would a new Pie phone be interseted in armeabi-v7a anyway?

Where can I set the 'device ABI' or otherwise fix this?

I can't find anything on Google. Thanks.

UPDATE

I've found this work around which is as worrying as it is bizarre:

  • Untick the armeabi-v7a option
  • Build
  • Re-tick the option
  • Build
  • Deploy

from https://forums.xamarin.com/discussion/146174/vs2019-error-this-abi-is-no-longer-supported

I'd like to understand what's going on here rather than just work around it.

This is only an issue with my A10 physical Samsung phone, in emulators it seems to work fine.

like image 378
niico Avatar asked Oct 30 '19 11:10

niico


People also ask

What is ABI mismatch?

"ADB0020: Android ABI mismatch. You are deploying an app supporting 'armeabi-v71;arm64-v8a' ABIs to an incompatible device of ABI 'x86'. You should either create an emulator matching one of your app's ABI's or add 'x86' to the lift of ABI's your app builds for." Debug and Build configuration are both set to Any CPU.

How do I find my ABI device?

If you are interested in the ABI that current process/runtime is running under (e.g. an arm64/x86_64 processor can run a 32-bit app_process to save memory), you should use CPU_ABI , CPU_ABI2 as it will return the correct result.

What are Android abi?

Different Android devices use different CPUs, which in turn support different instruction sets. Each combination of CPU and instruction set has its own Application Binary Interface (ABI). An ABI includes the following information: The CPU instruction set (and extensions) that can be used.


1 Answers

I got this error before. You could untick all the supported architectures to tick all of them like below. Delete the obj and bin folder of project to clean and rebuild. Most of times, it works.

enter image description here

Different Android devices use different CPUs, which in turn support different instruction sets. Each combination of CPU and instruction set has its own Application Binary Interface (ABI).

For more support of Android ABIs, you could refer to the Android ABIs guides. https://developer.android.com/ndk/guides/abis

like image 148
Wendy Zang - MSFT Avatar answered Oct 08 '22 01:10

Wendy Zang - MSFT