简体   繁体   中英

my android app run on emulator and run on android devices but does not login page work in mobile devices

我的 android 应用程序在模拟器上运行并在 android 设备上运行但没有登录,它给我用户名和密码的本地主机错误,所以请帮助我应该在数据库中给予什么类型的权限,我曾经使用过 MYSQL 数据库和 WAMP 服务器

If the database is local, you should add Read permissions (READ_EXTERNAL_STORAGE) And if it's internet database, you'll need internet permissions ("android.permission.INTERNET") Also, I'd suggest you to make sure you are on the correct network \\ addressing the correct IP, seeing as you get "localhost error" usually means you are addressing your own IP address. Just mentioning this, in case that is not the desired behavior you want from your app. Also, providing code will help a lot

Localhost will not work on physical devices. You need to ipv4 and port to connect to the database.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM