skip to Main Content

I am trying to upgrade android SDK version 30 to 31 . My build is happening fine while the time of installation I am facing the below issue .

The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

My other SDK versions are like

        buildToolsVersion = "29.0.2"
        minSdkVersion = 21
        compileSdkVersion = 28
        targetSdkVersion = 31  // Updated
        supportLibVersion = "28.0.0"
        kotlinVersion = "1.6.0"

My react-native version is 0.59.9 . Any suggestions ?

2

Answers


  1. Chosen as BEST ANSWER

    Fixed the issue by adding below code into AndroidManifest.xml

    android:exported="true"
    

    Like this

    <activity
    android:name=".MainActivity"
    android:exported="true">
    .....
    </activity>
    

  2. Ensure that the manifest entries representing the entry points of your application contain an explicit value for the android:exported attribute. It requires from API level 31+.

    <activity
       android:name=".MainActivity"
       android:exported="true">
       .....
    </activity>
    

    For more: https://developer.android.com/topic/security/risks/android-exported

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search