贝宝 Android INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

发布于 2025-01-12 12:10:11 字数 2442 浏览 0 评论 0原文

我正在尝试在我的应用程序中实现 paypal 沙箱,我已按照 中的每个步骤进行操作https://developer.paypal.com/sdk/in-app/android/ ,但是在导入所有内容之后,当我尝试启动我的应用程序时,出现以下错误:


Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

List of apks:
[0] '/Users/xxx/Desktop/Work/shop_java/app/build/outputs/apk/debug/app-debug.apk'
Installation failed due to: 'INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl695433300.tmp/base.apk (at Binary XML file line #63): com.paypal.pyplcheckout.home.view.activities.PYPLInitiateCheckoutActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present'

我不太明白为什么这是, 我的Android清单是:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.example.xxx">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />


    <application
        android:allowBackup="true"
        android:fullBackupContent="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:networkSecurityConfig="@xml/network_security_config"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        android:dataExtractionRules="@xml/data_extraction_rules">

        <activity android:name=".ProductActivity"/>
        <activity android:name=".promotion.PromotionItemActivity"
            />
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTask"
            android:hardwareAccelerated="true"
            tools:node="merge">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>


</manifest>

但是它失败了,我尝试重建,尝试清理,使缓存无效,gradle运行正常,但是当我尝试运行时它说这个,有什么解决方案吗?

I am trying to implement paypal sandbox into my application, i've followed every steps from the https://developer.paypal.com/sdk/in-app/android/ , however after importing everything and when i am trying to start my application i get the following error:


Installation did not succeed.
The application could not be installed: INSTALL_PARSE_FAILED_MANIFEST_MALFORMED

List of apks:
[0] '/Users/xxx/Desktop/Work/shop_java/app/build/outputs/apk/debug/app-debug.apk'
Installation failed due to: 'INSTALL_PARSE_FAILED_MANIFEST_MALFORMED: Failed parse during installPackageLI: /data/app/vmdl695433300.tmp/base.apk (at Binary XML file line #63): com.paypal.pyplcheckout.home.view.activities.PYPLInitiateCheckoutActivity: Targeting S+ (version 31 and above) requires that an explicit value for android:exported be defined when intent filters are present'

And i don't quite understand why it is,
my Android manifest is:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.example.xxx">

    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />


    <application
        android:allowBackup="true"
        android:fullBackupContent="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:networkSecurityConfig="@xml/network_security_config"
        android:roundIcon="@mipmap/ic_launcher_round"
        android:supportsRtl="true"
        android:theme="@style/AppTheme"
        android:dataExtractionRules="@xml/data_extraction_rules">

        <activity android:name=".ProductActivity"/>
        <activity android:name=".promotion.PromotionItemActivity"
            />
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTask"
            android:hardwareAccelerated="true"
            tools:node="merge">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>


</manifest>

However it fails, i tried to rebuild, tried to clean, invalidate caches, gradle runs ok, but when i try to run it says this, any solutions?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

莳間冲淡了誓言ζ 2025-01-19 12:10:11

尝试更新build.gradle中的库,现在最新版本是0.6.1。

实现 'com.paypal.checkout:android-sdk:0.6.1'

Try to update the Library in build.gradle now the last version is 0.6.1.

implementation 'com.paypal.checkout:android-sdk:0.6.1'

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文