I am trying to install my app in mobile through android studio. It perfectly worked earlier but now it is returning this error
Failed to finalize session : INSTALL_FAILED_USER_RESTRICTED: Invalid apk.
How to resolve this error?
I am trying to install my app in mobile through android studio. It perfectly worked earlier but now it is returning this error
Failed to finalize session : INSTALL_FAILED_USER_RESTRICTED: Invalid apk.
How to resolve this error?
I found my error and resolved it! In manifest file inside metadata element I had not mentioned valid value, by adding a value parameter the error got resolved. You will find detailed description here
`<manifest xmlns:android="http://schemas.android.com/apk/res/android"xmlns:tools="http://schemas.android.com/tools"package="com.example.cognoscenti.interact">
<!-- To auto-complete the email text field in the login form with the user's emails -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.READ_PROFILE" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.INTERNET" />
<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=".LoginActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".RegisterActivity" />
<activity
android:name=".ProfileActivity"
android:label="@string/title_activity_profile"
android:parentActivityName=".LoginActivity"
android:theme="@style/AppTheme.NoActionBar">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.example.cognoscenti.interact.LoginActivity" />
</activity>
<meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="Replace_Me"
tools:replace="android:value"/>
<provider
android:name="com.facebook.FacebookContentProvider"
android:authorities="com.facebook.app.FacebookContentProvider1620914054661826"
android:exported="true" />
<activity android:name=".AuthenticationActivity"></activity>
</application>
`