gpt4 book ai didi

android - BraintreeBrowserSwitchActivity 丢失错误

转载 作者:太空宇宙 更新时间:2023-11-03 16:39:19 24 4
gpt4 key购买 nike

我正在尝试使用 PayPal 测试付款流程,但在尝试打开 BraintreeFragment 时出现错误。

错误:BraintreeBrowserSwitchActivity 丢失,在 AndroidManifest.xml 中配置不正确,或者其他应用定义了与此应用相同的浏览器切换 URL。参见 the link为正确的配置

<activity 
android:name=".payment.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="com.entage.nrd.entage.braintree" />
</intent-filter>
</activity>

try { 
mBraintreeFragment = BraintreeFragment.newInstance(this, clientToken);
// mBraintreeFragment is ready to use!

PayPalRequest request = new PayPalRequest("1")
.currencyCode("USD")
.intent(PayPalRequest.INTENT_AUTHORIZE);
mBraintreeFragment.addListener(this);
PayPal.requestOneTimePayment(mBraintreeFragment, request);

} catch (InvalidArgumentException e) {
// There was an issue with your authorization string.
}

最佳答案

您可能需要完全限定名称:

<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>

关于android - BraintreeBrowserSwitchActivity 丢失错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58513165/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com