100mslive / 100ms-react-native

React Native Live Streaming, Video Conferencing SDK & Sample App
https://www.100ms.live/
MIT License
76 stars 29 forks source link

🐛 [ANDROID] A problem occurred configuring project ':100mslive_react-native-hms' #1355

Closed code-jenn-or closed 3 months ago

code-jenn-or commented 4 months ago

Description

Following react native quick start, installed depenedencies and added code but no successful builds. Even tried downgrading to 1.9.0 and still got error. This is my first time attempting to use this package.

For Android I get error:

BUILD FAILED in 2s
error Failed to install the app. Command failed with exit code 1: ./gradlew app:installUatDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong:
A problem occurred configuring project ':100mslive_react-native-hms'.
> Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl. > Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace. If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant. * 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 2s.

100ms React Native Version

1.10.0

React Native Version

0.73.2

Steps to reproduce

  1. Followed quick start and Installed dependencies.
  2. Attempted to build android (debug mode) and fails immediately
  3. Used react-native-clean to clean the build folder and build again, same error
  4. Downgrade to 1.9.0, same error.

Expected results

Expect successful build to be able to even test feature

Code example, screenshot, or link to a repository

Code sample ```js ``` ### Logs
Logs ```console ``` BUILD FAILED in 5s error Failed to install the app. Command failed with exit code 1: ./gradlew app:installUatDebug -PreactNativeDevServerPort=8081 FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':100mslive_react-native-hms'. > Could not create an instance of type com.android.build.api.variant.impl.LibraryVariantBuilderImpl. > Namespace not specified. Specify a namespace in the module's build file. See https://d.android.com/r/tools/upgrade-assistant/set-namespace for information about setting the namespace. If you've specified the package attribute in the source AndroidManifest.xml, you can use the AGP Upgrade Assistant to migrate to the namespace value in the build file. Refer to https://d.android.com/r/tools/upgrade-assistant/agp-upgrade-assistant for general information about using the AGP Upgrade Assistant. * 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 5s.
github-actions[bot] commented 4 months ago

Hello! Thank you for filing an issue.

Please include relevant logs or detailed description for faster resolutions.

We really appreciate your contribution!

ygit commented 3 months ago

hey @cmejet Can you share a zip of the project where this issue is happening?

ygit commented 3 months ago

hey @cmejet Can you share a project where this issue is reproducible?

code-jenn-or commented 3 months ago

I cannot share my project files BUT here is the react-native info output

System:
  OS: macOS 14.3.1
  CPU: (12) arm64 Apple M2 Pro
  Memory: 140.89 MB / 16.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 18.16.0
    path: /usr/local/bin/node
  Yarn:
    version: 1.22.19
    path: /usr/local/bin/yarn
  npm:
    version: 9.5.1
    path: /usr/local/bin/npm
  Watchman:
    version: 2024.01.22.00
    path: /opt/homebrew/bin/watchman
Managers:
  CocoaPods:
    version: 1.14.3
    path: /Users/jenn/.rbenv/shims/pod
SDKs:
  iOS SDK:
    Platforms:
      - DriverKit 23.4
      - iOS 17.4
      - macOS 14.4
      - tvOS 17.4
      - visionOS 1.1
      - watchOS 10.4
  Android SDK: Not Found
IDEs:
  Android Studio: 2022.2 AI-222.4459.24.2221.9862592
  Xcode:
    version: 15.3/15E204a
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.10
    path: /usr/bin/javac
  Ruby:
    version: 2.7.6
    path: /Users/jenn/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.73.2
    wanted: 0.73.2
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: true
  newArchEnabled: false

And here is a list of project dependencies:

 "dependencies": {
    "@100mslive/react-native-hms": "^1.10.1",
    "@apollo/client": "^3.8.1",
    "@expo/vector-icons": "^14.0.0",
    "@graphql-codegen/cli": "^5.0.0",
    "@medplum/core": "^3.0.2",
    "@medplum/expo-polyfills": "^3.0.2",
    "@medplum/fhirtypes": "^3.0.2",
    "@medplum/react-hooks": "^3.0.2",
    "@react-native-async-storage/async-storage": "1.21.0",
    "@react-native-community/checkbox": "^0.5.17",
    "@react-native-community/netinfo": "11.1.0",
    "@react-native-firebase/app": "^18.8.0",
    "@react-native-firebase/messaging": "^18.8.0",
    "@react-native-firebase/remote-config": "^18.7.1",
    "@react-navigation/bottom-tabs": "^6.5.7",
    "@react-navigation/material-top-tabs": "^6.6.2",
    "@react-navigation/native": "^6.1.6",
    "@react-navigation/native-stack": "^6.9.12",
    "@sentry/react-native": "5.19.1",
    "@splitsoftware/splitio-react-native": "0.7.0",
    "base-64": "^1.0.0",
    "dayjs": "^1.11.8",
    "expo": "~50.0.5",
    "expo-av": "~13.10.4",
    "expo-constants": "~15.4.5",
    "expo-crypto": "~12.8.0",
    "expo-device": "~5.9.3",
    "expo-file-system": "~16.0.5",
    "expo-font": "~11.10.2",
    "expo-keep-awake": "~12.8.2",
    "expo-secure-store": "~12.8.1",
    "expo-standard-web-crypto": "^1.7.0",
    "i18n-js": "^4.3.2",
    "lodash": "^4.17.21",
    "native-base": "^3.4.26",
    "react": "18.2.0",
    "react-native": "0.73.2",
    "react-native-biometrics": "^3.0.1",
    "react-native-blob-util": "^0.17.3",
    "react-native-collapsible": "^1.6.1",
    "react-native-device-info": "^10.4.0",
    "react-native-document-picker": "^9.1.1",
    "react-native-error-boundary": "^1.2.3",
    "react-native-file-viewer": "^2.1.5",
    "react-native-image-crop-picker": "^0.39.0",
    "react-native-inappbrowser-reborn": "^3.7.0",
    "react-native-keyboard-aware-scroll-view": "^0.9.5",
    "react-native-linkify": "^1.4.2",
    "react-native-localize": "^3.0.6",
    "react-native-mask-input": "^1.2.3",
    "react-native-pdf": "^6.6.2",
    "react-native-permissions": "^4.1.4",
    "react-native-radio-buttons-group": "^3.0.8",
    "react-native-render-html": "^6.3.4",
    "react-native-safe-area-context": "4.8.2",
    "react-native-screens": "^3.29.0",
    "react-native-stepper-view": "^0.2.6",
    "react-native-svg": "14.1.0",
    "react-native-tab-view": "^3.5.1",
    "react-native-twilio-video-webrtc": "https://github.com/blackuy/react-native-twilio-video-webrtc",
    "react-native-ux-cam": "^5.4.14",
    "react-native-video": "^5.2.1",
    "react-native-webview": "13.6.4",
    "semver-compare": "^1.0.0"
  },
  "devDependencies": {
    "@babel/core": "^7.23.2",
    "@babel/preset-env": "^7.23.2",
    "@babel/runtime": "^7.23.9",
    "@graphql-codegen/client-preset": "^4.1.0",
    "@graphql-codegen/fragment-matcher": "^5.0.0",
    "@graphql-codegen/typescript": "^4.0.1",
    "@graphql-codegen/typescript-graphql-files-modules": "^2.2.1",
    "@graphql-codegen/typescript-operations": "^4.0.1",
    "@graphql-codegen/typescript-react-apollo": "^3.3.7",
    "@react-native-community/slider": "4.4.2",
    "@react-native/eslint-config": "^0.72.2",
    "@react-native/metro-config": "^0.72.11",
    "@testing-library/jest-native": "^5.4.2",
    "@testing-library/react-hooks": "^8.0.1",
    "@testing-library/react-native": "^12.4.3",
    "@trivago/prettier-plugin-sort-imports": "^4.1.1",
    "@tsconfig/react-native": "^3.0.0",
    "@types/jest": "^29.2.1",
    "@types/lodash": "^4.14.194",
    "@types/react": "~18.2.45",
    "@types/react-test-renderer": "^18.0.0",
    "@typescript-eslint/eslint-plugin": "^6.21.0",
    "@typescript-eslint/parser": "^6.21.0",
    "babel-jest": "^29.2.1",
    "babel-loader": "^8.3.0",
    "babel-plugin-module-resolver": "^5.0.0",
    "eslint": "^8.2.0",
    "eslint-config-airbnb-base": "15.0.0",
    "eslint-config-airbnb-typescript": "^17.0.0",
    "eslint-config-prettier": "^9.1.0",
    "eslint-import-resolver-typescript": "^3.6.0",
    "eslint-plugin-ft-flow": "^2.0.1",
    "eslint-plugin-import": "^2.25.2",
    "eslint-plugin-jest": "^27.6.3",
    "eslint-plugin-prettier": "^5.1.3",
    "eslint-plugin-react-native": "^4.1.0",
    "graphql": "^16.8.1",
    "husky": "^8.0.0",
    "jest": "^29.2.1",
    "jest-fetch-mock": "^3.0.3",
    "metro-react-native-babel-preset": "0.76.7",
    "pod-install": "^0.1.38",
    "prettier": "^3.2.5",
    "react-dom": "18.2.0",
    "react-native-dotenv": "^3.4.8",
    "react-native-svg-transformer": "^1.0.0",
    "react-test-renderer": "18.2.0",
    "typescript": "^5.3.0"
  },
ygit commented 3 months ago

Thanks for these @cmejet Let us check & come back

ygit commented 3 months ago

hey @cmejet I see that you have react-native-twilio-video-webrtc installed in your app. You'll have to remove it to try out 100ms SDK. This is because both these packages use WebRTC underneath which causes name conflicts when installed together. Simply, remove the react-native-twilio-video-webrtc from your package.json file & try running the app.

Also, does the app runs fine on iOS?

ygit commented 3 months ago

hey @cmejet Were you able to check by removing the react-native-twilio-video-webrtc package?

github-actions[bot] commented 3 months ago

This issue was closed because it has been stalled for 5 days with no activity.