по какой-то причине мое приложение не запускается на моем эмуляторе AS. Вчера все работало отлично, но сегодня это работает - возможно, потому, что я переместил папку npm и npm -cache, но они настроены правильно с помощью npm config.
Сервер Metro запускается нормально, и если бы я только выбрал приложение, оно бы загрузилось, но теперь оно инсталлируется.
Если я пытаюсь запустить npm android, я получаю ошибка ниже:
PS C:\Dev\Programmierung\FitnessApp\FitnessApp> npm run android
> FitnessApp@0.0.1 android C:\Dev\Programmierung\FitnessApp\FitnessApp
> react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 1158 file(s) to forward-jetify. Using 6 workers...
info Starting JS server...
Der Befehl "adb" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
info Launching emulator...
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...
> Task :app:transformClassesWithDexBuilderForDebug FAILED
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.0.1/userguide/command_line_interface.html#sec:command_line_warnings
147 actionable tasks: 3 executed, 144 up-to-date
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> Unable to delete directory 'C:\Dev\Programmierung\FitnessApp\FitnessApp\android\app\build\intermediates\transforms\dexBuilder\debug\0\androidx\appcompat' after 10 attempts
* 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 17s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:transformClassesWithDexBuilderForDebug'.
> Unable to delete directory 'C:\Dev\Programmierung\FitnessApp\FitnessApp\android\app\build\intermediates\transforms\dexBuilder\debug\0\androidx\appcompat' after 10 attempts
* 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 17s
at makeError (C:\Dev\Programmierung\FitnessApp\FitnessApp\node_modules\execa\index.js:174:9)
at C:\Dev\Programmierung\FitnessApp\FitnessApp\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:94:5)
at async runOnAllDevices (C:\Dev\Programmierung\FitnessApp\FitnessApp\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (C:\Dev\Programmierung\FitnessApp\FitnessApp\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:186:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! FitnessApp@0.0.1 android: `react-native run-android`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the FitnessApp@0.0.1 android script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Dev\npm\npm-cache\_logs\2020-04-24T08_01_58_811Z-debug.log