React-native dev options not showing up on mobile app installed on Xiaomi Phone

风格不统一 提交于 2019-12-07 13:08:45

问题


When I try installing react-native app on my redmi note 3 mobile phone, It pops up an error which doesn't happen when I use any other mobile phone. I fixed this issue by disabling MIUI optimization. But after I did this, I'm not getting dev options when I shake my mobile.


回答1:


Ok, for anyone that like me didn't know what to do. The first answer is correct, but I if you are wondering what to do, just like I did, do the following.

  1. Open Security (an app installed by default on Note 3 phone)
  2. Click on Permissions
  3. Find your app that you've installed using React-Native, click on it.
  4. There should be a a permission Display pop-up window and it will be blocked.
  5. Press on this permisson and select Accept

This should do the trick. If, you do not see the Developer options menu, install your app again (I know I did). Hope this helps, Happy coding ;)




回答2:


My divice is Redmi Note 4 - 6.0.1

For MIUI 8 you need to turn off the MIUI optimization

for this

go to setting >> additional setting >> developer options >> disable "Turn on MIUI optimization"

this will install the app in MI device but it will ask for "permit drawing over other apps" permission every time you build the app by command react-native run-android to disable this

go to setting >> permissions >> other permissions >> select "permission" tab >> display popup window >> select your app >> accept 



回答3:


for XIOMI devices: 1) Enable USB debugging 2)Goto to developers menu and enable INSTALL VIA USB and USB DEBUGGING (Security settings) --- this will require you to connect to MI account

--You can run your native app now --




回答4:


you should set the dialog permission in the XIAOMI phone.



来源:https://stackoverflow.com/questions/38208646/react-native-dev-options-not-showing-up-on-mobile-app-installed-on-xiaomi-phone

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!