0

I am new to android application development, when I try to run my server(using Xampp) the app works fine on my emulator, However after changing http://10.0.2.2 to my local ip using(IPv 4), the app which is user registration does not work when attempting to test it on my real mobile device (oneplus 6t) which uses android pie since this error is shown when attempting to create a new account :

Register Error! com.android.volley.NoConnectionError: javax.net.ssl.SSLHandshakeException: java.security.cert.CertPathValidatorException: Trust anchor for certification path not found."

I believe that this error has something to due with my ip address because when I try to open the server using my ip the following alert is shown in google chrome

" Your connection is not private Attackers might be trying to steal your information from my ip-address (for example, passwords, messages, or credit cards). Learn more NET::ERR_CERT_COMMON_NAME_INVALID "enter image description here

Dr Mido
  • 2,414
  • 4
  • 32
  • 72
jesmar
  • 55
  • 7

2 Answers2

0

If you are using android 9, you need to have secure https connections, that's the error that is returning to you

Is the same error you are having in chrome

  • Any suggestions on how to make secure https connections? – jesmar Mar 28 '19 at 17:05
  • @jesmar https://stackoverflow.com/questions/51902629/how-to-allow-all-network-connection-types-http-and-https-in-android-9-pie this is how to make any type of connection in android 9 To have secure https connections you need a SSL certificate installed on your website – Matteo Alberghini Mar 29 '19 at 18:07
  • I have tried that solution but still did not work ...if I test it using a mobile phone that does not involve android pie it should work? – jesmar Mar 29 '19 at 21:12
0

Try this add manifest

cleartextTrafficPermitted="true"

How to allow all Network connection types HTTP and HTTPS in Android (9) Pie?

Hasan Kucuk
  • 2,433
  • 6
  • 19
  • 41