android - Problem runing 'react-native run-android'
问题描述
When i run 'react-native run-android' i get the following problem:
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* What went wrong:
Cannot create service of type TaskExecuter using ProjectExecutionServices.createTaskExecuter() as there is a problem with parameter #21 of type ReservedFileSystemLocationRegistry.
> Cannot create service of type ReservedFileSystemLocationRegistry using ProjectExecutionServices.createReservedFileLocationRegistry() as there is a problem with parameter #1 of type List<ReservedFileSystemLocation>.
Im using linux as my OS.
解决方案
I met this. Finally I found that I have installed app in the phone. I solved the problem when i have uninstalled the app and run with different port like:
Before Uninstall
- The emulator is running press CMD + m (Mac) or CTRL + m (Windows). Select Dev Settings and then Debug server host & port for device. Enter the url with the new port(9988).
- CMD + R or CTRL + R and the application should reload with the new bundle.
- uninstalled app
- Run app with this command such as: react-native start --port 9988
推荐阅读
- orocommerce - 没有任何实体别名的 OroPlatform
- azure - Azure 流 URL 有效性
- ios - 我试图通过比较另一个字典中的键来更改一个字典中的值
- dynamics-crm - Dynamics CRM 错误:无法更新对象,因为在关闭电话时它是只读的
- mysql - 如何从同一张表中查询城市名称以及最小城市名称的长度
- google-sheets - 将谷歌表格中的复选框链接到另一个表格?
- django - Django 找不到存储在 app_name/templates/app_name 的模板
- json - http从资产中获取在已发布的应用程序Angular 9中不起作用
- python - 如何使用 python 图形创建飞机雷达?(画)
- javascript - 将按钮添加到动态创建的表格行