Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Warning: Unexpected CPU variant for X86 using defaults: x86 [duplicate]

While trying to create a simple math game in android studio 2.3.1 after trying to execute my project, the app closes in emulator and gives warnings;

5-17 06:52:14.573 3088-3088/com.example.hp.game W/art: Unexpected CPU variant for X86 using defaults: x86
05-17 06:52:14.744 3088-3088/com.example.hp.game W/System: ClassLoader referenced unknown path: /data/app/com.example.hp.game-1/lib/x86
05-17 06:52:14.877 3088-3104/com.example.hp.game W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...

And I tried solving the problem, but I do not understand why these warnings come up and how to fix them!

like image 209
andu Avatar asked May 17 '17 10:05

andu


1 Answers

You don't need to fix this as it is just a warning according to source code https://android.googlesource.com/platform/art/+/master/runtime/arch/x86/instruction_set_features_x86.cc.

// Verify that variant is known.
bool known_variant = FindVariantInArray(x86_known_variants, arraysize(x86_known_variants),
                                          variant);
if (!known_variant && variant != "default") {
    LOG(WARNING) << "Unexpected CPU variant for X86 using defaults: " << variant;
}

The definition for x86_known_variants is

static constexpr const char* x86_known_variants[] = {
    "atom",
    "sandybridge",
    "silvermont",
    "kabylake",
};

If your emulators or devices are x86_64 or x86 you will see this warning which can be ignored.

like image 50
shizhen Avatar answered Sep 30 '22 07:09

shizhen