Ошибка сборки DETOX (ошибка: пакет android.support.annotation не существует, импорт android.support.annotation.NonNull) - PullRequest
0 голосов
/ 19 января 2019

рабочая команда detox build --configuration android.emu.debug выдает следующую ошибку

, когда я пытаюсь собрать детокс-сборку в Linux, выдает эту ошибку, связанную с androidx, но она отлично работает на Mac.

ПоявляетсяЭта проблема связана с тем, как gradle использует jetifier, поскольку пакеты поддержки Android, похоже, не заменяются в Linux

Could not resolve all files for configuration ':detox:minReactNative44DebugCompileClasspath'.
> Could not resolve com.squareup.okhttp3:okhttp:3.4.1.
  Required by:
      project :detox
   > Cannot find a version of 'com.squareup.okhttp3:okhttp' that satisfies the version constraints:
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp' strictly '3.4.1' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 3.4.1
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp' strictly '3.4.1' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 3.4.1
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp' strictly '3.4.1' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 3.4.1
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.squareup.okhttp3:okhttp:3.11.0'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp-ws:3.4.1' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.facebook.fresco:imagepipeline-okhttp3:1.10.0'--> 'com.squareup.okhttp3:okhttp:3.10.0'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.squareup.okhttp3:okhttp-urlconnection:3.11.0'--> 'com.squareup.okhttp3:okhttp:3.11.0'

> Could not resolve com.squareup.okio:okio:1.9.0.
  Required by:
      project :detox
   > Cannot find a version of 'com.squareup.okio:okio' that satisfies the version constraints:
        Dependency path 'testrepo2:detox:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.squareup.okio:okio:1.14.0'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.11.0' --> 'com.squareup.okio:okio:1.14.0'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.squareup.okhttp3:okhttp:3.11.0' --> 'com.squareup.okio:okio:1.14.0'
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okio:okio' strictly '1.9.0' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 1.9.0
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okio:okio' strictly '1.9.0' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 1.9.0

> Could not resolve com.squareup.okhttp3:okhttp:3.4.1.
  Required by:
      project :detox
      project :detox > com.squareup.okhttp3:okhttp-ws:3.4.1
   > Cannot find a version of 'com.squareup.okhttp3:okhttp' that satisfies the version constraints:
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp' strictly '3.4.1' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 3.4.1
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp' strictly '3.4.1' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 3.4.1
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp' strictly '3.4.1' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 3.4.1
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.squareup.okhttp3:okhttp:3.11.0'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp-ws:3.4.1' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.facebook.fresco:imagepipeline-okhttp3:1.10.0'--> 'com.squareup.okhttp3:okhttp:3.10.0'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.squareup.okhttp3:okhttp-urlconnection:3.11.0'--> 'com.squareup.okhttp3:okhttp:3.11.0'

> Could not resolve com.squareup.okhttp3:okhttp:3.11.0.
  Required by:
      project :detox > com.facebook.react:react-native:0.57.8
      project :detox > com.facebook.react:react-native:0.57.8 > com.squareup.okhttp3:okhttp-urlconnection:3.11.0
   > Cannot find a version of 'com.squareup.okhttp3:okhttp' that satisfies the version constraints:
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp' strictly '3.4.1' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 3.4.1
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp' strictly '3.4.1' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 3.4.1
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp' strictly '3.4.1' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 3.4.1
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.squareup.okhttp3:okhttp:3.11.0'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp-ws:3.4.1' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.facebook.fresco:imagepipeline-okhttp3:1.10.0'--> 'com.squareup.okhttp3:okhttp:3.10.0'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.squareup.okhttp3:okhttp-urlconnection:3.11.0'--> 'com.squareup.okhttp3:okhttp:3.11.0'

> Could not resolve com.squareup.okio:okio:1.14.0.
  Required by:
      project :detox > com.facebook.react:react-native:0.57.8
      project :detox > com.squareup.okhttp3:okhttp:3.11.0
   > Cannot find a version of 'com.squareup.okio:okio' that satisfies the version constraints:
        Dependency path 'testrepo2:detox:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.squareup.okio:okio:1.14.0'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.11.0' --> 'com.squareup.okio:okio:1.14.0'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.squareup.okhttp3:okhttp:3.11.0' --> 'com.squareup.okio:okio:1.14.0'
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okio:okio' strictly '1.9.0' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 1.9.0
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okio:okio' strictly '1.9.0' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 1.9.0

> Could not resolve com.squareup.okhttp3:okhttp:3.10.0.
  Required by:
      project :detox > com.facebook.react:react-native:0.57.8 > com.facebook.fresco:imagepipeline-okhttp3:1.10.0
   > Cannot find a version of 'com.squareup.okhttp3:okhttp' that satisfies the version constraints:
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp' strictly '3.4.1' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 3.4.1
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp' strictly '3.4.1' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 3.4.1
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Constraint path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp' strictly '3.4.1' because of the following reason: minReactNative44DebugRuntimeClasspath uses version 3.4.1
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.squareup.okhttp3:okhttp:3.11.0'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.squareup.okhttp3:okhttp-ws:3.4.1' --> 'com.squareup.okhttp3:okhttp:3.4.1'
        Dependency path 'testrepo2:detox:unspecified' --> 'com.facebook.react:react-native:0.57.8' --> 'com.facebook.fresco:imagepipeline-okhttp3:1.10.0'--> 'com.squareup.okhttp3:okhttp:3.10.0'
...