首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >“未能完成会话: INSTALL_FAILED_USER_RESTRICTED:无效的apk”

“未能完成会话: INSTALL_FAILED_USER_RESTRICTED:无效的apk”
EN

Stack Overflow用户
提问于 2018-04-15 13:40:09
回答 1查看 709关注 0票数 0

我正试图通过android工作室在手机上安装我的应用程序。它以前完美地工作过,但是现在它返回了这个错误。

未能完成会话: INSTALL_FAILED_USER_RESTRICTED:无效的apk。

如何解决此错误?

EN

回答 1

Stack Overflow用户

发布于 2018-04-16 06:26:53

我发现了我的错误并解决了它!在元数据元素中的清单文件中,我没有提到有效值,通过添加值参数,错误得到了解决。You will find detailed description here

代码语言:javascript
复制
`<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>

`

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/49842583

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档