1

I made a simple app using Cards in Material Components in Android. When I try to run it in my "OnePlus AC2001" mobile, I'm getting this error in logcat.

2021-01-31 17:28:59.544 26933-26933/? E/rialdesigncard: Unknown bits set in runtime_flags: 0x28000

But I'm not getting any error when I run the app in the emulator.

This is my MainActivity.java file:

public class MainActivity extends AppCompatActivity {

    CardView cardView;
    TextView textView;
    CheckBox checkBox;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        init();
    }

    private void init() {
        cardView = findViewById(R.id.my_card_ui);
        textView = findViewById(R.id.title_text);
        checkBox = findViewById(R.id.checkbox);

        cardView.setOnClickListener(v -> {
            checkBox.setChecked(checkBox.isChecked()? false: true);
            textView.setText("First title");
        });
    }
}

This is my ActivityMain.xml:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <com.google.android.material.card.MaterialCardView
        android:id="@+id/my_card_ui"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:checkable="true"
        android:clickable="true"
        android:focusable="true">

        <LinearLayout
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:orientation="vertical"
            android:padding="30dp">

            <CheckBox
                android:id="@+id/checkbox"
                android:layout_width="30dp"
                android:layout_height="30dp" />

            <TextView
                android:id="@+id/title_text"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="Title 1"
                android:textColor="@color/black"
                android:textSize="30dp"
                android:textStyle="bold" />

            <TextView
                android:id="@+id/title_para"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:text="I am a paragraph and I am in a card. I am a paragraph and I am in a card. I am a paragraph and I am in a card."
                android:textColor="@color/purple_700"
                android:textSize="20dp" />
        </LinearLayout>
    </com.google.android.material.card.MaterialCardView>
</LinearLayout>

I couldn't find the solution to this error anywhere. Please help me solve this.

Light Yagami
  • 961
  • 1
  • 9
  • 29

1 Answers1

0

I have been consistently seeing this error for some time now (OnePlus device), but I haven't been able to find a solution either. The error does not seem to impact the app in any way though.

Additional point of information:

I have observed that this error appears in the Logcat whenever I Run/Debug the app on a real device, but it does not show up consistently in the Run/Debug consoles. I haven't tried to check (as you have) if the error is replicated when using an emulator.

Also, my Logcat shows the Unknown bits set in runtime_flags: 0x20000 error for many other packages as the device is running. Some examples: .android.dialer, oneplus.weather, twitter.android, and so on.

This is what I've found out so far:

  • From the ARM DS5 DUI0446U Debugger User Guide, a possible memory map for internal RAM can be between 0x8000 and 0x28000. I'm not from a computer engineering background, and I'm not sure if this is a relevant direction for understanding the problem further. Searching the Android Runtime (ART) site (this, or in general, this) yielded no useful results.

  • For a related error, by following this answer to the ART source code, 0x28000 seems to be related to either the DEBUG_IGNORE_APP_SIGNAL_HANDLER flag or the DISABLE_TEST_API_ENFORCEMENT_POLICY flag (line 154-155 as of this time of this post). [E.g., 1 << 17 is 0x20000]


I don't have a deeper understanding of the either of the two flags. Nevertheless, the 0x20000 error seems to be pretty commonplace in production apps. While this is not an indication that the 0x28000 error is equally hassle-free, to my mind it does shed some light on the nature of the runtime_flags.

It just might be the case that errors related to these flags (see the enum in the source code) may not really "break" the app. Some further information is required in order to be absolutely certain, but the above might be good enough to not be concerned about the app breaking.

P.S.: If you think this response is good enough, do mark it as an answer so I will have some feedback as well.

SarangD
  • 198
  • 1
  • 9