php - Login app using MySQL database with Android Studio -
as title says, i'm trying make first android app simple login feature fetching username , password mysql database i'm getting following error in logcat , app crashes when click on login button
01-27 12:35:11.787 2509-2525/? e/androidruntime: fatal exception: asynctask #2 process: com.example.klm.sql, pid: 2509 java.lang.runtimeexception: error occurred while executing doinbackground() @ android.os.asynctask$3.done(asynctask.java:309) @ java.util.concurrent.futuretask.finishcompletion(futuretask.java:354) @ java.util.concurrent.futuretask.setexception(futuretask.java:223) @ java.util.concurrent.futuretask.run(futuretask.java:242) @ android.os.asynctask$serialexecutor$1.run(asynctask.java:234) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1113) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:588) @ java.lang.thread.run(thread.java:818) caused by: java.lang.classcastexception: com.android.okhttp.internal.huc.httpurlconnectionimpl cannot cast javax.net.ssl.httpsurlconnection @ com.example.klm.sql.background.doinbackground(background.java:39) @ com.example.klm.sql.background.doinbackground(background.java:23) @ android.os.asynctask$2.call(asynctask.java:295) @ java.util.concurrent.futuretask.run(futuretask.java:237) @ android.os.asynctask$serialexecutor$1.run(asynctask.java:234) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1113) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:588) @ java.lang.thread.run(thread.java:818)
can tell me these errors mean?how can solve it?
ok got it. had change:
string login_url = "http://10.0.2.2/login.php";
to:
string login_url = "https://10.0.2.2/login.php";
Comments
Post a Comment