问题
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.
- Open
Security
(an app installed by default on Note 3 phone) - Click on
Permissions
- Find your app that you've installed using
React-Native
, click on it. - There should be a a permission
Display pop-up window
and it will be blocked. - 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