BraintreeBrowserSwitchActivity丢失,在AndroidManifest.xml或其他应用程序中配置错误,与此应用程序定义了相同的浏览器开关URL

问题描述 投票:1回答:1

我正在尝试将Braintree Android SDK实施到我的应用中。当我尝试使用PayPal付款方式时,我遇到了一个奇怪的错误。 Braintree的文档说我必须在AndroidManifest中实现它:

<activity android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity"
            android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="${applicationId}.braintree" />
            </intent-filter>
</activity>

所以这是实现后的AndroidManifest:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.plugon.flutterbraintree_example">

    <!-- io.flutter.app.FlutterApplication is an android.app.Application that
         calls FlutterMain.startInitialization(this); in its onCreate method.
         In most cases you can leave this as-is, but you if you want to provide
         additional functionality it is fine to subclass or reimplement
         FlutterApplication and put your custom class here. -->
    <application
        android:name="io.flutter.app.FlutterApplication"
        android:label="flutterbraintree_example"
        android:icon="@mipmap/ic_launcher">
        <activity
            android:name=".MainActivity"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <!-- This keeps the window background of the activity showing
                 until Flutter renders its first frame. It can be removed if
                 there is no splash screen (such as the default splash screen
                 defined in @style/LaunchTheme). -->
            <meta-data
                android:name="io.flutter.app.android.SplashScreenUntilFirstFrame"
                android:value="true" />
            <intent-filter>
                <action android:name="android.intent.action.MAIN"/>
                <category android:name="android.intent.category.LAUNCHER"/>
            </intent-filter>
        </activity>
        <activity android:name="com.braintreepayments.api.BraintreeBrowserSwitchActivity"
            android:launchMode="singleTask">
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />
                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
                <data android:scheme="${applicationId}.braintree" />
            </intent-filter>
        </activity>
    </application>
</manifest>

所以我的代码运行正常,所有内容都显示出来,但是当我选择Paypal付款时,出现此错误: >所以有什么想法我做错了吗?

谢谢!

我正在尝试将Braintree Android SDK实施到我的应用中。当我尝试使用PayPal付款方式时,我遇到了一个奇怪的错误。 Braintree的文档说我必须实现此...

java android flutter braintree
1个回答
0
投票
© www.soinside.com 2019 - 2024. All rights reserved.