Как исправить сбой сборки Android с React Native в Gradle?com.google.firebase: firebase-iid запрашивается различными другими библиотеками - PullRequest
1 голос
/ 29 апреля 2019

Я попытался создать подписанный APK в соответствии с инструкциями здесь: https://facebook.github.io/react-native/docs/signed-apk-android

При запуске ./gradlew assembleRelease я получаю ошибку сборки, как показано ниже. Мое приложение использует Google Firebase для аутентификации и tipsi-stripe в качестве одной из основных библиотек. Это отдельная выставка Экспо.

Я попытался добавить дополнительные зависимости, включая ядро ​​Firebase в app/build.gradle

Ошибка в терминале.

❯ ./gradlew assembleRelease
Parallel execution is an incubating feature.

{..}
> Task :tipsi-stripe:compileReleaseRenderscript FAILED
> Task :app:checkDevKernelReleaseClasspath FAILED
> Task :react-native-firebase:compileReleaseRenderscript FAILED

FAILURE: Build completed with 3 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Failed to capture fingerprint of input files for task ':tipsi-stripe:compileReleaseRenderscript' property 'importDirs' during up-to-date check.
> The library com.google.firebase:firebase-iid is being requested by various other libraries at [[16.2.0,16.2.0]], but resolves to 17.0.4. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.


==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Failed to capture fingerprint of input files for task ':app:checkDevKernelReleaseClasspath' property 'compileClasspath' during up-to-date check.
> The library com.google.firebase:firebase-iid is being requested by various other libraries at [[16.2.0,16.2.0]], but resolves to 17.0.4. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.


==============================================================================

3: Task failed with an exception.
-----------
* What went wrong:
Failed to capture fingerprint of input files for task ':react-native-firebase:compileReleaseRenderscript' property 'importDirs' during up-to-date check.
> The library com.google.firebase:firebase-iid is being requested by various other libraries at [[16.2.0,16.2.0]], but resolves to 17.0.4. Disable the plugin and check your dependencies tree using ./gradlew :app:dependencies.


==============================================================================

BUILD FAILED in 18s
38 actionable tasks: 3 executed, 35 up-to-date

EDIT:

Я попытался изменить /build.gradle на версию 16.2.0,

resolutionStrategy {
         ...
          force 'com.google.firebase:firebase-iid:16.2.0'
        }

Это привело к другому, но тому же типу ошибки:

> Task :tipsi-stripe:compileReleaseRenderscript FAILED
> Task :app:checkDevKernelReleaseClasspath FAILED
> Task :react-native-firebase:compileReleaseRenderscript FAILED

Could not resolve all files for configuration ':tipsi-stripe:releaseCompileClasspath'.
> Could not find com.google.android.gms:play-services-measurement-api:11.8.0.
...
> Could not find com.google.android.gms:play-services-measurement-base:11.8.0.
...
> Could not find com.google.android.gms:play-services-ads-identifier:11.8.0.
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...