Why my app is working fine on my android emulator but its not working fine on my real android device

Viewed 63

My app is working fine on my android emulator but its not working fine on my real android device my i am using react native & nodejs if anyone can has faced this same problem pls help me

NOTE

  • MY REAL PHONE resolution & screen size ARE SAME WITH MY android emulator BOTH ARE SAME
  • MY ANDRIOD EMULTOR API IS 30

ISSUE THAT I CAN SEE IN MY REAL ANDRIOD PHONE

  • Some text are going their on the wrong position
  • Some text are not even seeing to me but their onpress event is working
  • my backend is not connecting with my app. I mean socketio is not connecting in my real phone but its connecting in my emulator i am using http://10.0.2.2:3000 in my base url to connect my app with backend i can't use localhost because emulator is not supporting it So the question is what url should i use to connect to my app with backend while using my real phone?

WHAT I HAVE TRIED

  • Deleted my app from my real phone than run npm start & npx react-native run-android

  • i have added android:usesCleartextTraffic="true" in android\app\src\main\AndroidManifest.xml

  • i have also done cd android ./gradlew clean cd .. and than npx react-native run-android

  • NONE OF THESE SOLUTIONS WORKS IN MY CASE

HOW IT LOOK LIKE IN MY ANDRIOD EMULTOR ITS LOOKING FINE AND THIS ONLY I WANT

enter image description here enter image description here

BUT HOW IT IS LOOKING IN MY REAL PHONE

enter image description here enter image description here

1 Answers

Add a this on your textinput to make your text visible. This will make your placeholder text visible. placeholderTextColor="#808080"

Related