首页 > 解决方案 > Flutter Braintree 插件不起作用并导致错误

问题描述

我正在尝试将 Braintree 插件集成到我的应用程序以进行贝宝付款,但由于它导致错误而无法实现。请看一看。非常感谢您的帮助

这是我在 AndroidManifest.xml 文件中所做的更改,因为它在插件 redme 中是必需的。

xmlns:tools= "http://schemas.android.com/tools"
    package="com.example.hire_me">
    <application
        android:name=".Application"
        android:label="hire_me"
        android:icon="@mipmap/ic_launcher"
        tools:replace ="android:label">
  >......
          <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>

Androidx 是 true 并且错误如下:

What went wrong:
Execution failed for task ':app:processDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed
     C:\Users\NazarDesign\.gradle\caches\transforms-2\files-2.1\a430b2c5dddf3df7a27521b6fa87f10f\browser-switch-1.1.3\AndroidManifest.xml:11:5-19:15: AAPT: error: unexpected element <queries> found in <manifest>.
2
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 20s
The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetifier to solve the incompatibility.
Building plugin cloud_firestore... ```


```FAILURE: Build failed with an exception.

What went wrong:
A problem occurred configuring root project 'cloud_firestore'.
SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable. ```

标签: flutterpaypalflutter-dependenciesbraintree

解决方案


推荐阅读