无法连接到远程调试器(Unable to connect to remote debugger)
我正在Android模拟器Nexus_23中构建一个反应本机应用程序。 我试图连接到远程调试器,但我得到一个超时错误。 在清爽的时候,我被困在一个空白的白色屏幕上。
试过:(1)根据互联网上的一些建议重新安装谷歌浏览器,但仍面临同样的问题。 (2)我设置了我的IP地址(“Dev Settings” - >“Debug server host for device”)xxxx:8081(3)尝试过adb reverse tcp:8081 tcp:8081
react-native:0.52.0反应:16.2.0
请帮助!
I am building a react native app in Android Emulator Nexus_23. I am trying to connect to the remote debugger but I get a Timeout error. On refreshing I am stuck on a blank white screen.
Tried: (1) re-installing Google Chrome too according to a few suggestions on Internet but still facing the same problem. (2) I set my ip address ("Dev Settings" -> "Debug server host for device") x.x.x.x:8081 (3) tried adb reverse tcp:8081 tcp:8081
react-native: 0.52.0 react: 16.2.0
Kindly help!
原文:https://stackoverflow.com/questions/48394893
最满意答案
你可以试试这个:
article_count = len(articles) output = "There are {} articles.".format(article_count)
len是一个在对象上调用的函数,format方法已经为你调用了str方法。
You can try this:
article_count = len(articles) output = "There are {} articles.".format(article_count)
len is a function that you call on a object and the format method already calls the str method for you.
相关问答
更多-
如何在Django View中使用Django templatetags ...?(How to use Django templatetags in Django View…?)[2023-08-15]
解决方案我发现..我应该仔细阅读他们的代码。 多谢你们! lorem_ipsum.paragraphs(3, False) lorem_ipsum.words(3, False) 第二个参数决定是否使用常用词 Solution I found.. I should read their code carefully. Thanks guys! lorem_ipsum.paragraphs(3, False) lorem_ipsum.words(3, False) Second param dec ... -
它可以是任何callable 。 这就是例如实现了__call__方法的类。 查看django的基于类视图的文档。 还要检查这个问题,以了解callable 。 It could be any callable. That is e.g. class with __call__ method implemented. Check django's documentation for class based views. Also check this question to get the idea wha ...
-
你可以试试这个: article_count = len(articles) output = "There are {} articles.".format(article_count) len是一个在对象上调用的函数,format方法已经为你调用了str方法。 You can try this: article_count = len(articles) output = "There are {} articles.".format(article_count) len is a function ...
-
我可以提出一些建议,至少可以帮助我们找出问题所在: 在您的设置中设置DEBUG = True ,这样您就可以在结果中获得整个回溯而不仅仅是500。 将您在视图中得到的答案发布给我们: 打印请求['POST'] 使用基于您的模型的ModelForm并使用Django内置表单验证来帮助您处理数据。 希望能帮助到你。 Got it - There were 2 problems. First, in the JS, I noticed there were 2 POSTs being performed. I a ...
-
我会在这里做两件事。 首先,将您的网址格式更改为如下所示: url(r'^getUsers/$', views.getUsers), 其次,将你的AngularJS代码改为如下所示: $http.get("getUsers/") .then(function(output) { $scope.testUser = output; console.log($scope.testUser); }); Django对URL上的“/”(或不是)敏感。 并且改变上面的URL模式使得它明确它应该 ...
-
这个功能有什么问题?(What is wrong with this function?)[2023-11-15]
这个代码中有很多问题。 strlen和strlent,除非你有一个奇怪的库函数。 你正在堆栈上定义一个静态缓冲区。 这是一个潜在的错误(也是安全问题),因为稍后会将一行字符串复制到它而不检查长度。 可能的解决方案可以是在堆上分配内存(使用strlen和malloc的组合),也可以使用strncpy并接受字符串的切断。 附加'\ n'确实可以解决添加新行的问题,但是这会产生更多的错误,因为字符串当前不是空终止的。 解决方案:追加'\ n'和'\ 0'以终止新字符串。 正如其他人所提到的,你正在返回一个指向局部 ... -
我今天早些时候才发现什么是错的。 我没有立即注意到,我试图编辑的页面不是一个django-cms托管页面,这就是占位符不工作的原因。 在django-cms托管页面中,占位符正常工作。 谢谢 I just found out earlier today what was wrong. I didn't notice immediately, that the page i was trying to edit was not a django-cms managed page which is why th ...
-
django导入一个视图功能(django import a view function)[2024-02-09]
当然,你可以解决它。 通过适当的导入和参数,您可以执行此操作。 #app: app1 #someview.py def a_view(request, someparam): #some code here #app: app2 #otherview.py from app1.someview import a_view def another_view(request): param = 1 a_view(request, param) 至于一个例子 更新:希望提及,你的函数a_vie ... -
你的urls.py文件设置错误。 第一个参数是一个匹配URL的正则表达式,因此^$将匹配根路径。 name参数用于获取特定视图的URL,例如,当您使用reverse函数时。 ^表示一行的开始, $表示一行的结束。 两者之间没有任何关系,它将匹配一条空行。 要匹配另一个URL,例如/waypoints-save/ ,您需要编写另一个正则表达式: ^/waypoints-save/$ 。 这将匹配行的开头,后跟字符/waypoints-save/ ,然后是行的结尾。 为了让你的整个urls.py设置正确,它应该 ...
-
django有问题(Something wrong with django)[2020-09-01]
我认为你的问题是你试图访问一个post而不迭代posts 。 正如您在post_list视图中看到的post_list ,您有: ... return render(request, 'blog/post_list.html', {'posts': posts}) 因此,您将名为posts的变量发送到模板。 但是在您的模板中,您尝试访问post :{{ post.title }}
但它不 ...