betaacid / expo-analytics

Google Analytics integration for use with React Native apps built on Expo
MIT License
288 stars 62 forks source link

EAS build fails: Execution failed for task ':expo-constants:compileReleaseKotlin' #85

Open xicond opened 2 years ago

xicond commented 2 years ago

Summary

I have sdk 42, node: 12.22.11 Success on classic build of expo build but fail in eas build as expo build will be discontinue in January 4, 2023

{
  "dependencies": {
    .....
    "expo": "^42.0.0",
    "expo-analytics": "^1.0.18",
    "expo-asset": "~8.3.2",
    "expo-barcode-scanner": "~10.2.2",
    "expo-camera": "~11.2.2",
    "expo-cli": "~5.4.5",
    "expo-constants": "~11.0.1",
    "expo-device": "~3.3.0",
    "expo-document-picker": "~9.2.4",
    "expo-file-system": "~11.1.3",
    "expo-image-manipulator": "~9.2.2",
    "expo-image-picker": "~10.2.2",
    "expo-linking": "~2.3.1",
    "expo-location": "~12.1.2",
    "expo-network": "~3.2.0",
    "expo-notifications": "~0.12.3",
    "expo-splash-screen": "~0.11.2",
    "expo-status-bar": "~1.0.4",
    "expo-updates": "~0.8.1",
    "react": "16.13.1",
    "react-dom": "16.13.1",
    "react-native": "0.63.4",
    "react-native-autocomplete-input": "^5.0.2",
    "react-native-calendars": "1.1266.0",
    "react-native-confirmation-code-input": "^1.0.4",
    "react-native-dropdown-picker": "^3.8.0",
    "react-native-elements": "^3.4.1",
    "react-native-gesture-handler": "~1.10.2",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-lightbox": "^0.8.1",
    "react-native-modal-datetime-picker": "^10.0.0",
    "react-native-modalbox": "^2.0.2",
    "react-native-pager-view": "5.0.12",
    "react-native-reanimated": "~2.2.1",
    "react-native-safe-area-context": "3.2.0",
    "react-native-screens": "~3.4.0",
    "react-native-size-matters": "^0.4.0",
    "react-native-svg": "12.1.1",
    "react-native-unimodules": "~0.14.5",
    "react-native-version-check-expo": "^3.4.2",
    "react-native-web": "~0.13.12",
    "react-native-webview": "11.6.2",
    "react-query": "^3.34.5",
    "react-redux": "^7.2.4",
    "react-refresh": "^0.8.3",
    "redux": "^3.7.2",
    ....
  }
}

Running eas build fails with the below logs in the "Run gradle" step

> Task :expo-constants:compileReleaseAidl NO-SOURCE
> Task :expo-constants:generateReleaseBuildConfig
> Task :expo-constants:parseReleaseLocalResources
> Task :expo-constants:generateReleaseRFile
> Task :expo-constants:compileReleaseKotlin FAILED
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt: (6, 21): Unresolved reference: core
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt: (7, 21): Unresolved reference: core
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt: (8, 21): Unresolved reference: core
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt: (9, 21): Unresolved reference: core
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt: (11, 21): Unresolved reference: core
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt: (15, 39): Unresolved reference: ModuleRegistryDelegate
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt: (15, 64): Unresolved reference: ModuleRegistryDelegate
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt: (16, 5): Unresolved reference: ExportedModule
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt: (20, 55): Not enough information to infer type variable T
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt: (22, 3): 'getConstants' overrides nothing
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt: (24, 3): 'getName' overrides nothing
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt: (26, 3): 'onCreate' overrides nothing
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt: (26, 41): Unresolved reference: ModuleRegistry
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt: (30, 4): Unresolved reference: ExpoMethod
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsModule.kt: (31, 41): Unresolved reference: Promise
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsPackage.kt: (5, 21): Unresolved reference: core
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsPackage.kt: (6, 21): Unresolved reference: core
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsPackage.kt: (7, 21): Unresolved reference: core
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsPackage.kt: (9, 26): Unresolved reference: BasePackage
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsPackage.kt: (10, 3): 'createInternalModules' overrides nothing
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsPackage.kt: (10, 62): Unresolved reference: InternalModule
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsPackage.kt: (13, 3): 'createExportedModules' overrides nothing
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsPackage.kt: (13, 62): Unresolved reference: ExportedModule
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsService.kt: (7, 21): Unresolved reference: core
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsService.kt: (24, 6): Class 'ConstantsService' is not abstract and does not implement abstract member public abstract fun getAppId(): String! defined in expo.modules.interfaces.constants.ConstantsInterface
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsService.kt: (24, 61): Unresolved reference: InternalModule
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsService.kt: (40, 3): 'getExportedInterfaces' overrides nothing
[stderr] e: /home/expo/workingdir/build/node_modules/expo-analytics/node_modules/expo-constants/android/src/main/java/expo/modules/constants/ConstantsService.kt: (71, 3): 'getAppScopeKey' overrides nothing
[stderr] FAILURE: Build failed with an exception.
[stderr] * What went wrong:
[stderr] Execution failed for task ':expo-constants:compileReleaseKotlin'.
[stderr] > Compilation error. See log for more details
[stderr] * Try:
[stderr] 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.
[stderr] * Get more help at https://help.gradle.org
[stderr] BUILD FAILED in 5m 0s
Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/6.8/userguide/command_line_interface.html#sec:command_line_warnings
402 actionable tasks: 402 executed
Error: Gradle build failed with unknown error. Please see logs for the "Run gradlew" phase.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

Android

SDK Version (managed workflow only)

42.0.0

Environment

npx: installed 2 in 2.527s

  expo-env-info 1.0.3 environment info:
    System:
      OS: macOS 11.5.2
      Shell: 3.2.57 - /bin/bash
    Binaries:
      Node: 12.22.11 - ~/.nvm/versions/node/v12.22.11/bin/node
      npm: 6.14.16 - ~/.nvm/versions/node/v12.22.11/bin/npm
      Watchman: 2022.03.21.00 - /usr/local/bin/watchman
    Managers:
      CocoaPods: 1.10.2 - /usr/local/bin/pod
    SDKs:
      iOS SDK:
        Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
    IDEs:
      Android Studio: 2020.3 AI-203.7717.56.2031.7935034
      Xcode: 12.5.1/12E507 - /usr/bin/xcodebuild
    npmPackages:
      expo: ^42.0.0 => 42.0.5
      react: 16.13.1 => 16.13.1
      react-dom: 16.13.1 => 16.13.1
      react-native: 0.63.4 => 0.63.4
      react-native-web: ~0.13.12 => 0.13.18
    npmGlobalPackages:
      eas-cli: 0.52.0
      expo-cli: 5.4.5
    Expo Workflow: managed

Reproducible demo

(check the logs above)