I'm developing an app with Android Studio, java. I perform some operations that require an Async class. After I started using such classes, other activities are no longer able to connect to Sql Server, returning the error message: android.os.NetworkOnMainThreadException.
The Activity that is showing this error does not make any calls or uses Async routines. But after I implemented some Async class in my project, I can no longer minimally open a database in SQL Server.
Does anyone know what the problem is or can explain to me what I'm doing wrong.
Async classes work perfectly fine without any issues.
1条答案
按热度按时间6bc51xsx1#
Request Data either local or network , It suppose to be request from Background Thread.
android.os.NetworkOnMainThreadException