I am following the doc below to test a simple react-native app on Android device.
https://facebook.github.io/react-native/docs/running-on-device
The Android phone is connected with Win 10 with USB cable and adb devices listed the phone attached. Then react-native run-android has the error below:
JS server already running.
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
C:\Users\JunC.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar \fac05a1d62890194dfe0138c04501245\res\values-v28\values-v28.xml:9:5-12:13: AAPT: error: resource android:attr/dialogCornerRadius not found.
C:\D\code\js\emps\android\app\build\intermediates\incremental\mergeDebugResources\merged.dir \values-v28\values-v28.xml:11: AAPT: error: resource android:attr/dialogCornerRadius not found.
C:\Users\JunC.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar \fac05a1d62890194dfe0138c04501245\res\values\values.xml:1304:5-69: AAPT: error: resource android:attr/fontVariationSettings not found.
C:\Users\JunC.gradle\caches\transforms-1\files-1.1\appcompat-v7-28.0.0.aar\fac05a1d62890194dfe0138c04501245\res\values\values.xml:1304:5-69: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:processDebugResources'.
Failed to process resources, see aapt output above for details.
Get more help at https://help.gradle.org
BUILD FAILED in 3s
13 actionable tasks: 1 executed, 12 up-to-date
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
Command failed: gradlew.bat installDebug
Error: Command failed: gradlew.bat installDebug
at checkExecSyncError (child_process.js:616:11)
at Object.execFileSync (child_process.js:634:13)
at runOnAllDevices (C:\d\code\js\empsnode_modules\react-native\local-cli\runAndroid\runAndroid.js:299:19)
at buildAndRun (C:\d\code\js\empsnode_modules\react-native\local-cli\runAndroid\runAndroid.js:135:12)
at isPackagerRunning.then.result (C:\d\code\js\empsnode_modules\react-native\local-cli\runAndroid\runAndroid.js:65:12)
at process._tickCallback (internal/process/next_tick.js:68:7)
./gradlew.bat installDebug returns the command was not recognized and there is no templates subdir under my C:\Users\user\AppData\Local\Android\Sdk\tools (as one post suggests adding the path). Did I miss some debug modules with the proejct? Many thanks.
We are automatically closing this issue because it does not appear to follow any of the provided issue templates.
馃憠 Click here if you want to report a reproducible bug or regression in React Native.