Using System.getProperty ("os.arch") to check if it is armeabi cpu

I had the following problem with RenderScript on some old 4.2.2 devices (galaxy s3 mini, galaxy ace 3, galaxy fresh, etc.) - Android - Renderscript support Library - Error loading RS jni library .

I want to implement the proposed solution, but what exactly value will be returned

System.getProperty ("os.arch");

for armeabi devices (not armeabi-v7 devices).

Thanks.

+4
source share
1 answer

System.getProperty - Java, .

Linux , uname -m. : t22, armeabi , .

System.getProperty, Build.CPU_ABI ( Build.SUPPORTED_ABIS ):

String abi = null;

if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
    abi = Build.CPU_ABI;
} else {
    abi = Build.SUPPORTED_ABIS[0];
}

: armeabi, armeabi-v7a, arm64-v8a, x86, x86_64, mips, mips64.

, , System.getProperty, armeabi.

+7

Source: https://habr.com/ru/post/1615776/


All Articles