Reputation: 257
I'm new to android development and this is my first try out. when try to run the template project created by android studio I'm seeing below error.
Failed to finalize session : INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION: Failed parse during installPackageLI: Failed to read manifest from /data/app/vmdl2093545946.tmp/split_lib_slice_9_apk.apk: null
below is the AndroidManifest.xml file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.customtab">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
and here is the activity_main.xml file
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Hello Android !"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>
wondering what I'm missing here.
Upvotes: 0
Views: 2477
Reputation: 1
try to turn off the instant run from Settings>Build Execution, Deployment > Instant Run. then Rebuild Your project and run it.
Upvotes: 0
Reputation: 517
I have also just experienced this error when trying to run my app targeting the API30 on an Android API 30 Emulator. Clean and rebuid did not help and downgrading the target API back to 29 was not an option for me, because I needed to test the app targeting API 30. Turned out that the cause was Instant Run feature enabled in Android Studio.
Solution was found here.
Upvotes: 3