我正在使用我的第一个React本机应用程序,iOS版本运行良好,但是当我执行npm run android
(或在Android Studio中打开它)时,会出现此类错误
FAILURE: Build completed with 3 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Failed to capture snapshot of input files for task ':react-native-device-info:compileDebugAidl' property 'importDirs' during up-to-date check.
> The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
* 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.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Failed to capture snapshot of input files for task ':app:preDebugBuild' property 'compileManifests' during up-to-date check.
> The library com.google.android.gms:play-services-base is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
* 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.
==============================================================================
3: Task failed with an exception.
-----------
* What went wrong:
Failed to capture snapshot of input files for task ':react-native-google-signin:compileDebugAidl' property 'importDirs' during up-to-date check.
> The library com.google.android.gms:play-services-base is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.0.1. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.
* 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
我认为主要的问题是此The library com.google.android.gms:play-services-base is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 16.0.1.
,但是play-services-base
行在一个项目(版本15.0.1)中仅被发现一次。
我不知道如何进一步工作。