Студия Android не работает ⇐ Android
-
Anonymous
Студия Android не работает
So I created a backend for my app on Android studio and the front end on react native.However , when I run the app on Android studio it doesn’t stay running.It terminates very quick and I need it to stay running.Any ideas on how to fix this? I tried to add Android:persistent: true in the Android Manifest file but it didn’t work
This is what i see in my log cat
"C:\Program Files\Android\Android Studio\jbr\bin\java.exe" "-javaagent:C:\Program Files\Android\Android Studio\lib\idea_rt.jar=51284:C:\Program Files\Android\Android Studio\bin" -Dfile.encoding=UTF-8 @C:\Users\haroo\AppData\Local\Temp\idea_arg_file2069765526 com.example.prosubscriberapp.ApplicationKt 16:52:02.016 [main] INFO Application -- Autoreload is disabled because the development mode is off. 16:52:02.137 [main] INFO Application -- Application started in 0.88 seconds. 16:52:02.307 [KtorShutdownHook] DEBUG io.netty.util.internal.logging.InternalLoggerFactory -- Using SLF4J as the default logging framework 16:52:02.693 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- -Dio.netty.noUnsafe: false 16:52:02.695 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- Java version: 17 16:52:02.710 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- sun.misc.Unsafe.theUnsafe: available 16:52:02.718 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- sun.misc.Unsafe.copyMemory: available 16:52:02.725 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- sun.misc.Unsafe.storeFence: available 16:52:02.732 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- java.nio.Buffer.address: available 16:52:02.740 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- direct buffer constructor: unavailable: Reflective setAccessible(true) disabled 16:52:02.746 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- java.nio.Bits.unaligned: available, true 16:52:02.753 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable: class io.netty.util.internal.PlatformDependent0$7 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @1e8f3784 16:52:02.761 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- java.nio.DirectByteBuffer.(long, {int,long}): unavailable 16:52:02.761 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- sun.misc.Unsafe: available 16:52:02.762 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- -Dio.netty.tmpdir: C:\Users\haroo\AppData\Local\Temp (java.io.tmpdir) 16:52:02.763 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- -Dio.netty.bitMode: 64 (sun.arch.data.model) 16:52:02.771 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- Platform: Windows 16:52:02.785 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- -Dio.netty.maxDirectMemory: -1 bytes 16:52:02.786 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- -Dio.netty.uninitializedArrayAllocationThreshold: -1 16:52:02.797 [KtorShutdownHook] DEBUG io.netty.util.internal.CleanerJava9 -- java.nio.ByteBuffer.cleaner(): available 16:52:02.797 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- -Dio.netty.noPreferDirect: false 16:52:03.580 [KtorShutdownHook] DEBUG io.netty.channel.MultithreadEventLoopGroup -- -Dio.netty.eventLoopThreads: 24 16:52:03.720 [KtorShutdownHook] DEBUG io.netty.util.concurrent.GlobalEventExecutor -- -Dio.netty.globalEventExecutor.quietPeriodSeconds: 1 16:52:03.792 [KtorShutdownHook] DEBUG io.netty.util.internal.InternalThreadLocalMap -- -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024 16:52:03.792 [KtorShutdownHook] DEBUG io.netty.util.internal.InternalThreadLocalMap -- -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096 16:52:03.949 [KtorShutdownHook] DEBUG io.netty.channel.nio.NioEventLoop -- -Dio.netty.noKeySetOptimization: false 16:52:03.950 [KtorShutdownHook] DEBUG io.netty.channel.nio.NioEventLoop -- -Dio.netty.selectorAutoRebuildThreshold: 512 16:52:04.073 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- org.jctools-core.MpscChunkedArrayQueue: available Process finished with exit code 0
Источник: https://stackoverflow.com/questions/781 ... ay-running
So I created a backend for my app on Android studio and the front end on react native.However , when I run the app on Android studio it doesn’t stay running.It terminates very quick and I need it to stay running.Any ideas on how to fix this? I tried to add Android:persistent: true in the Android Manifest file but it didn’t work
This is what i see in my log cat
"C:\Program Files\Android\Android Studio\jbr\bin\java.exe" "-javaagent:C:\Program Files\Android\Android Studio\lib\idea_rt.jar=51284:C:\Program Files\Android\Android Studio\bin" -Dfile.encoding=UTF-8 @C:\Users\haroo\AppData\Local\Temp\idea_arg_file2069765526 com.example.prosubscriberapp.ApplicationKt 16:52:02.016 [main] INFO Application -- Autoreload is disabled because the development mode is off. 16:52:02.137 [main] INFO Application -- Application started in 0.88 seconds. 16:52:02.307 [KtorShutdownHook] DEBUG io.netty.util.internal.logging.InternalLoggerFactory -- Using SLF4J as the default logging framework 16:52:02.693 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- -Dio.netty.noUnsafe: false 16:52:02.695 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- Java version: 17 16:52:02.710 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- sun.misc.Unsafe.theUnsafe: available 16:52:02.718 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- sun.misc.Unsafe.copyMemory: available 16:52:02.725 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- sun.misc.Unsafe.storeFence: available 16:52:02.732 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- java.nio.Buffer.address: available 16:52:02.740 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- direct buffer constructor: unavailable: Reflective setAccessible(true) disabled 16:52:02.746 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- java.nio.Bits.unaligned: available, true 16:52:02.753 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- jdk.internal.misc.Unsafe.allocateUninitializedArray(int): unavailable: class io.netty.util.internal.PlatformDependent0$7 cannot access class jdk.internal.misc.Unsafe (in module java.base) because module java.base does not export jdk.internal.misc to unnamed module @1e8f3784 16:52:02.761 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent0 -- java.nio.DirectByteBuffer.(long, {int,long}): unavailable 16:52:02.761 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- sun.misc.Unsafe: available 16:52:02.762 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- -Dio.netty.tmpdir: C:\Users\haroo\AppData\Local\Temp (java.io.tmpdir) 16:52:02.763 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- -Dio.netty.bitMode: 64 (sun.arch.data.model) 16:52:02.771 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- Platform: Windows 16:52:02.785 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- -Dio.netty.maxDirectMemory: -1 bytes 16:52:02.786 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- -Dio.netty.uninitializedArrayAllocationThreshold: -1 16:52:02.797 [KtorShutdownHook] DEBUG io.netty.util.internal.CleanerJava9 -- java.nio.ByteBuffer.cleaner(): available 16:52:02.797 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- -Dio.netty.noPreferDirect: false 16:52:03.580 [KtorShutdownHook] DEBUG io.netty.channel.MultithreadEventLoopGroup -- -Dio.netty.eventLoopThreads: 24 16:52:03.720 [KtorShutdownHook] DEBUG io.netty.util.concurrent.GlobalEventExecutor -- -Dio.netty.globalEventExecutor.quietPeriodSeconds: 1 16:52:03.792 [KtorShutdownHook] DEBUG io.netty.util.internal.InternalThreadLocalMap -- -Dio.netty.threadLocalMap.stringBuilder.initialSize: 1024 16:52:03.792 [KtorShutdownHook] DEBUG io.netty.util.internal.InternalThreadLocalMap -- -Dio.netty.threadLocalMap.stringBuilder.maxSize: 4096 16:52:03.949 [KtorShutdownHook] DEBUG io.netty.channel.nio.NioEventLoop -- -Dio.netty.noKeySetOptimization: false 16:52:03.950 [KtorShutdownHook] DEBUG io.netty.channel.nio.NioEventLoop -- -Dio.netty.selectorAutoRebuildThreshold: 512 16:52:04.073 [KtorShutdownHook] DEBUG io.netty.util.internal.PlatformDependent -- org.jctools-core.MpscChunkedArrayQueue: available Process finished with exit code 0
Источник: https://stackoverflow.com/questions/781 ... ay-running
Мобильная версия