I had to delete the test folder in Android Studio.
The app does not ask for permission to access the location, which causes the crash.
FATAL EXCEPTION: main
Process: com.mob.lee.fastair, PID: 31432
java.lang.IllegalArgumentException: Permission launcher is null,you should call registerPermission first
at com.mob.lee.fastair.viewmodel.AppViewModel.withPermission(AppViewModel.kt:68)
at com.mob.lee.fastair.fragment.DiscoverFragment.setting(DiscoverFragment.kt:62)
at com.mob.lee.fastair.base.AppFragment.onViewCreated(AppFragment.kt:52)
at androidx.fragment.app.Fragment.performViewCreated(Fragment.java:3019)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:551)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:261)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:1840)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:1764)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:1701)
at androidx.fragment.app.FragmentManager$4.run(FragmentManager.java:488)
at android.os.Handler.handleCallback(Handler.java:883)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7386)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:980)
I saw devices that had no application on board. This is Android TV. Very strange. But the fact is that when I started the application on both devices. But this does not affect anything. When connecting devices between devices. WifiP2P - scanning does not go away at all.
Most likely I probably don’t understand how it works to implement the solution to this problem.
FATAL EXCEPTION: DefaultDispatcher-worker-16
Process: com.mob.lee.fastair, PID: 13147
java.nio.channels.ClosedChannelException
at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:235)
at f2.a$d.x(Unknown Source:32)
at u2.a.j(Unknown Source:11)
at w5.v0.run(Unknown Source:88)
at kotlinx.coroutines.internal.k.run(Unknown Source:12)
at kotlinx.coroutines.scheduling.k.run(Unknown Source:2)
at kotlinx.coroutines.scheduling.a.x(Unknown Source:0)
at kotlinx.coroutines.scheduling.a$c.d(Unknown Source:14)
at kotlinx.coroutines.scheduling.a$c.n(Unknown Source:28)
at kotlinx.coroutines.scheduling.a$c.run(Unknown Source:0)
Suppressed: w5.t0: [l2{Cancelling}@72b0a80, Dispatchers.IO]
I clicked by selecting all the files in one section, two files came out, clicked send and then went to the site of the running server and the application crashed.
The site of the server does not look at all.understand, to be honest...