[BUG] Example Android app does not build
Closed this issue · 1 comments
michaelachrisco commented
Description
When running npx react-native run-android
, the example app provided in: https://github.com/nagarro-dv/react-native-zoom-us-bridge/tree/master/RNZoomUSBridgeExample does not build. The following errors are produced:
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
warn: removing resource com.rnzoomusbridgeexample:string/zm_alert_host_allow_talk_msg_2_131001 without required default value.
warn: removing resource com.rnzoomusbridgeexample:string/zm_text_mfa_resend_time_176897 without required default value.
error: resource style/Theme.MaterialComponents.DayNight (aka com.rnzoomusbridgeexample:style/Theme.MaterialComponents.DayNight) not found.
error: resource style/Theme.MaterialComponents.DayNight (aka com.rnzoomusbridgeexample:style/Theme.MaterialComponents.DayNight) not found.
error: resource style/Theme.MaterialComponents.DayNight (aka com.rnzoomusbridgeexample:style/Theme.MaterialComponents.DayNight) not found.
error: failed linking references.
React Native version:
$ react-native info
info Fetching system and libraries information...
(node:17436) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
System:
OS: Linux 5.4 Pop!_OS 20.04 LTS
CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
Memory: 7.81 GB / 31.07 GB
Shell: 5.0.17 - /bin/bash
Binaries:
Node: 14.13.0 - /usr/bin/node
Yarn: 1.22.5 - /usr/bin/yarn
npm: 6.14.8 - /usr/bin/npm
npmPackages:
react: 16.9.0 => 16.9.0
react-native: 0.61.0 => 0.61.0
npmGlobalPackages:
react-native-cli: 2.0.1
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Fork repo. Follow instructions here for android build: https://github.com/nagarro-dv/react-native-zoom-us-bridge/blob/master/README.md#android-zoomus-sdk-installation
npx react-native start
npx react-native run-android
Expected Results
I expect the build to be successful.
Snack, code example, screenshot, or link to a repository:
npx react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 874 file(s) to forward-jetify. Using 12 workers...
info JS server already running.
adb server version (41) doesn't match this client (39); killing...
ADB server didn't ACK
Full server startup log: /tmp/adb.1001.log
Server had pid: 17021
--- adb starting (pid 17021) ---
adb I 11-02 09:11:41 17021 17021 main.cpp:57] Android Debug Bridge version 1.0.39
adb I 11-02 09:11:41 17021 17021 main.cpp:57] Version 1:8.1.0+r23-5ubuntu2
adb I 11-02 09:11:41 17021 17021 main.cpp:57] Installed as /usr/lib/android-sdk/platform-tools/adb
adb I 11-02 09:11:41 17021 17021 main.cpp:57]
adb I 11-02 09:11:41 17021 17021 adb_auth_host.cpp:416] adb_auth_init...
adb I 11-02 09:11:41 17021 17021 adb_auth_host.cpp:174] read_key_file '/home/shift3/.android/adbkey'...
adb I 11-02 09:11:41 17021 17021 adb_auth_host.cpp:391] adb_auth_inotify_init...
adb server killed by remote request
* failed to start daemon
error: cannot connect to daemon
info Launching emulator...
09:11:43 D/DeviceMonitor: Opening adb connection
09:11:43 D/DeviceMonitor: Connected to adb for device monitoring
09:11:43 V/EmulatorConsole: Creating emulator console for 5556
09:11:44 V/EmulatorConsole: Removing emulator console for 5556
09:11:44 V/ddms: execute: running getprop
09:11:44 V/ddms: execute 'getprop' on 'emulator-5556' : EOF hit. Read: -1
09:11:44 V/ddms: execute: returning
/home/shift3/Documents/Github/react-native-zoom-us-bridge/RNZoomUSBridgeExample/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-pt/values-pt.xml:1139: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/home/shift3/Documents/Github/react-native-zoom-us-bridge/RNZoomUSBridgeExample/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-it/values-it.xml:1139: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/home/shift3/Documents/Github/react-native-zoom-us-bridge/RNZoomUSBridgeExample/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-ja/values-ja.xml:1101: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/home/shift3/Documents/Github/react-native-zoom-us-bridge/RNZoomUSBridgeExample/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rCN/values-zh-rCN.xml:1101: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/home/shift3/Documents/Github/react-native-zoom-us-bridge/RNZoomUSBridgeExample/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-es/values-es.xml:1139: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/home/shift3/Documents/Github/react-native-zoom-us-bridge/RNZoomUSBridgeExample/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-de/values-de.xml:1139: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/home/shift3/Documents/Github/react-native-zoom-us-bridge/RNZoomUSBridgeExample/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rHK/values-zh-rHK.xml:1101: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/home/shift3/Documents/Github/react-native-zoom-us-bridge/RNZoomUSBridgeExample/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-ko/values-ko.xml:1115: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/home/shift3/Documents/Github/react-native-zoom-us-bridge/RNZoomUSBridgeExample/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-zh-rTW/values-zh-rTW.xml:1101: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/home/shift3/Documents/Github/react-native-zoom-us-bridge/RNZoomUSBridgeExample/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-ru/values-ru.xml:1225: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/home/shift3/Documents/Github/react-native-zoom-us-bridge/RNZoomUSBridgeExample/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-vi/values-vi.xml:1097: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/home/shift3/Documents/Github/react-native-zoom-us-bridge/RNZoomUSBridgeExample/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:2665: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
/home/shift3/Documents/Github/react-native-zoom-us-bridge/RNZoomUSBridgeExample/android/app/build/intermediates/incremental/mergeDebugResources/merged.dir/values-fr/values-fr.xml:1139: warn: multiple substitutions specified in non-positional format; did you mean to add the formatted="false" attribute?.
> Task :app:processDebugResources FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.5/userguide/command_line_interface.html#sec:command_line_warnings
32 actionable tasks: 6 executed, 26 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
warn: removing resource com.rnzoomusbridgeexample:string/zm_alert_host_allow_talk_msg_2_131001 without required default value.
warn: removing resource com.rnzoomusbridgeexample:string/zm_text_mfa_resend_time_176897 without required default value.
error: resource style/Theme.MaterialComponents.DayNight (aka com.rnzoomusbridgeexample:style/Theme.MaterialComponents.DayNight) not found.
error: resource style/Theme.MaterialComponents.DayNight (aka com.rnzoomusbridgeexample:style/Theme.MaterialComponents.DayNight) not found.
error: resource style/Theme.MaterialComponents.DayNight (aka com.rnzoomusbridgeexample:style/Theme.MaterialComponents.DayNight) not found.
error: failed linking references.
* 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 4s
error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> Android resource linking failed
warn: removing resource com.rnzoomusbridgeexample:string/zm_alert_host_allow_talk_msg_2_131001 without required default value.
warn: removing resource com.rnzoomusbridgeexample:string/zm_text_mfa_resend_time_176897 without required default value.
error: resource style/Theme.MaterialComponents.DayNight (aka com.rnzoomusbridgeexample:style/Theme.MaterialComponents.DayNight) not found.
error: resource style/Theme.MaterialComponents.DayNight (aka com.rnzoomusbridgeexample:style/Theme.MaterialComponents.DayNight) not found.
error: resource style/Theme.MaterialComponents.DayNight (aka com.rnzoomusbridgeexample:style/Theme.MaterialComponents.DayNight) not found.
error: failed linking references.
* 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 4s
at checkExecSyncError (child_process.js:616:11)
at execFileSync (child_process.js:634:15)
at runOnAllDevices (/home/shift3/Documents/Github/react-native-zoom-us-bridge/RNZoomUSBridgeExample/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:94:39)
at processTicksAndRejections (internal/process/task_queues.js:93:5
The issue may be related to the build.gradle
. Found this in SO: https://stackoverflow.com/questions/53186009/error-compiling-android-app-with-material-components-and-androidx
affan00733 commented
implementation 'com.google.android.material:material:1.2.0-alpha02'