[英]“Failed to finalize session : INSTALL_FAILED_USER_RESTRICTED: Invalid apk.”
I am trying to install my app in mobile through android studio. 我正在尝试通过android studio在移动设备上安装我的应用程序。 It perfectly worked earlier but now it is returning this error 之前它工作完美,但现在返回此错误
Failed to finalize session : INSTALL_FAILED_USER_RESTRICTED: Invalid apk. 无法完成会话:INSTALL_FAILED_USER_RESTRICTED:无效的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>
` `
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.