hotwired / turbo-android

Android framework for making Turbo native apps
MIT License
407 stars 51 forks source link

Localhost is not loading for Turbo android app #334

Closed indigotechtutorials closed 1 month ago

indigotechtutorials commented 1 month ago

I am trying to build a simple turbo android app following the Quickstart guide and I am getting an issue with loading the app from localhost I used the correct alias for localhost http://10.0.2.2:3000 and I am still seeing an error loading the page Interestingly enough if I use the turbo demo apps url it does work and also if I setup ngrok and add that url it also loads without an issue. So there seems to be some issue related to loading the page from http://10.0.2.2:3000

Screenshot 2024-05-17 195549 Screenshot 2024-05-17 200007

indigotechtutorials commented 1 month ago

I found out the answer which was also mentioned in the QuickStart guide but I didn't notice it You need to set android:usesCleartextTraffic="true" on the application element inside of the AndroidManifest.xml or else you will see this annoying error

Screenshot 2024-05-17 221545