I'd like to connect a brand new OnePlus 7 test device with USB to my dev laptop and install our app to it, straight from Android Studio.

However, Android Studio shows this:

enter image description here

...and trying to run the app on the device fails with:

The app doesn't support SDK version of the device: (1).

I found out that this is related to abiFilters which we have specified for (both) build types:

ndk {
    abiFilters "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}

That is in there for a reason, but I'm new to this and probably couldn't explain it well... Trying to remove abiFilters would cause build (:app:packageDebugBundle) to fail with "All modules with native libraries must support the same set of ABIs ..."

Edit: this boils down to the fact that one module in the app uses a proprietary library including native libraries (.so) that are only available for [ARM64_V8A, ARMEABI_V7A, X86, X86_64]. It's beyond our control to change that.

So which ABI is missing on that list? What ABI does OnePlus 7 use? It has a Qualcomm Snapdragon 855 CPU but I couldn't easily figure out what that maps to.

One additional point: the app works just fine on OnePlus 7 when distributed over Google Play. Any workaround to make it work also locally?


Any other ideas to make this work? The device obviously has USB debugging enabled; could there be some other developer option I'm missing?

1

There are 1 answers

1
Jonik On BEST ANSWER

Rather weird altogether, but got it solved.

I also tried adb install on the command line, and it failed with error: device unauthorized. That prompted me to try what this answer suggested: revoking USB authorizations.

After that, and re-connecting the cable & giving the USB debugging permission again, clicking "play" in Android Studio installed & started the app just fine on the OnePlus device.