简体   繁体   English

“无法完成会话:INSTALL_FAILED_USER_RESTRICTED:无效的APK。”

[英]“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.

相关问题 android中的失败[INSTALL_FAILED_USER_RESTRICTED: Invalid apk] - Failure [INSTALL_FAILED_USER_RESTRICTED: Invalid apk] in android Android 工作室:失败 [INSTALL_FAILED_USER_RESTRICTED] - Android Studio: Failure [INSTALL_FAILED_USER_RESTRICTED] INSTALL_FAILED_USER_RESTRICTED 通过 USB 安装被禁用 - INSTALL_FAILED_USER_RESTRICTED Installation via USB is disabled 无法安装应用程序:INSTALL_FAILED_USER_RESTRICTED - The application could not be installed: INSTALL_FAILED_USER_RESTRICTED INSTALL_FAILED_USER_RESTRICTED:android studio 使用 redmi 4 设备 - INSTALL_FAILED_USER_RESTRICTED : android studio using redmi 4 device 无法完成会话:INSTALL_FAILED_INVALID_APK:已多次定义拆分lib_slice_0_apk - Failed to finalize session : INSTALL_FAILED_INVALID_APK: Split lib_slice_0_apk was defined multiple times 部署失败:INSTALL_FAILED_USER_RESTRICTED:安装被用户取消,没有弹出允许窗口 - Deployment failed: INSTALL_FAILED_USER_RESTRICTED: Install canceled by User without allow-window popping up INSTALL_FAILED_USER_RESTRICTED:安装被用户通过 adb 安装应用程序取消(无 SIM 卡) - INSTALL_FAILED_USER_RESTRICTED: Install canceled by user install apps via adb (no Sim Card) 定位 SDK Android Q 导致无法完成会话:INSTALL_FAILED_INVALID_APK:无法提取本机库,res=-2 - Targeting SDK Android Q results in Failed to finalize session : INSTALL_FAILED_INVALID_APK: Failed to extract native libraries, res=-2 安装split apks时出错:com.android.ddmlib.InstallException:无法完成会话:INSTALL_FAILED_INVALID_APK - Error installing split apks: com.android.ddmlib.InstallException: Failed to finalize session : INSTALL_FAILED_INVALID_APK
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM