DEV Community

putu eka mulyana
putu eka mulyana

Posted on

Kenapa Project Android Setelah release atau build Gagal Fetch Api

Pendahuluan

hari ini saya mengalami error pada project android saya, setalah saya relase apk dan mau ditest ternyata muncul error gagal fatch api kebackend. setalah saya googling ternyata penyebab errornya karena domain server saya masi menggunakan http.

Solusi

untuk fix error gagal fetch yang pertama bisa ubah url dari http menjadi https, yang kedua bisa tambahakan android:usesCleartextTraffic="true" di file AndroidManifest.xml

refrensi

https://github.com/nowsecure/secure-mobile-development/blob/master/en/android/set-usescleartexttraffic-to-false.md

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

AWS GenAI LIVE!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️