У меня очень простой код:
import 'package:flutter/material.dart';
class OurSplashScreen extends StatefulWidget {
@override
_OurSplashScreenState createState() => _OurSplashScreenState();
}
class _OurSplashScreenState extends State<OurSplashScreen> {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(
child: CircularProgressIndicator(),
),
);
}
}
На эмуляторе все работает отлично, все получается как положено. Однако, когда я запускаю его на устройстве, он выходит на экран и запускает небольшую полоску поворота, а затем все приложение зависает. Кажется, нет никаких ошибок или чего-то еще. И это следующий вывод отладочной информации:
Launching lib\main.dart on GM1917 in debug mode...
√ Built build\app\outputs\apk\debug\app-debug.apk.
W/DynamiteModule(15025): Local module descriptor class for providerinstaller not found.
W/r.ref_book_clu(15025): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Lsun/misc/Unsafe;->arrayBaseOffset(Ljava/lang/Class;)I (greylist,core-platform-api, linking, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Lsun/misc/Unsafe;->copyMemory(JJJ)V (greylist, linking, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Lsun/misc/Unsafe;->objectFieldOffset(Ljava/lang/reflect/Field;)J (greylist,core-platform-api, linking, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Lsun/misc/Unsafe;->getByte(J)B (greylist,core-platform-api, linking, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Lsun/misc/Unsafe;->getByte(Ljava/lang/Object;J)B (greylist,core-platform-api, linking, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Lsun/misc/Unsafe;->getLong(J)J (greylist,core-platform-api, linking, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, linking, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Lsun/misc/Unsafe;->putByte(JB)V (greylist,core-platform-api, linking, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Lsun/misc/Unsafe;->putByte(Ljava/lang/Object;JB)V (greylist,core-platform-api, linking, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, reflection, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Lsun/misc/Unsafe;->getLong(Ljava/lang/Object;J)J (greylist,core-platform-api, reflection, allowed)
W/r.ref_book_clu(15025): Accessing hidden field Ljava/nio/Buffer;->address:J (greylist, reflection, allowed)
I/DynamiteModule(15025): Considering local module providerinstaller:0 and remote module providerinstaller:0
W/ProviderInstaller(15025): Failed to load providerinstaller module: No acceptable module found. Local version is 0 and remote version is 0.
I/r.ref_book_clu(15025): The ClassLoaderContext is a special shared library.
I/r.ref_book_clu(15025): The ClassLoaderContext is a special shared library.
I/r.ref_book_clu(15025): The ClassLoaderContext is a special shared library.
V/NativeCrypto(15025): Registering com/google/android/gms/org/conscrypt/NativeCrypto's 286 native methods...
W/r.ref_book_clu(15025): Accessing hidden method Ljava/security/spec/ECParameterSpec;->getCurveName()Ljava/lang/String; (greylist, reflection, allowed)
D/NetworkSecurityConfig(15025): No Network Security Config specified, using platform default
I/ProviderInstaller(15025): Installed default security provider GmsCore_OpenSSL
W/r.ref_book_clu(15025): Accessing hidden field Ljava/net/Socket;->impl:Ljava/net/SocketImpl; (greylist, reflection, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Ldalvik/system/CloseGuard;->get()Ldalvik/system/CloseGuard; (greylist,core-platform-api, linking, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Ldalvik/system/CloseGuard;->open(Ljava/lang/String;)V (greylist,core-platform-api, linking, allowed)
W/r.ref_book_clu(15025): Accessing hidden field Ljava/io/FileDescriptor;->descriptor:I (greylist, JNI, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Ljava/security/spec/ECParameterSpec;->setCurveName(Ljava/lang/String;)V (greylist, reflection, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Ldalvik/system/BlockGuard;->getThreadPolicy()Ldalvik/system/BlockGuard$Policy; (greylist,core-platform-api, linking, allowed)
W/r.ref_book_clu(15025): Accessing hidden method Ldalvik/system/BlockGuard$Policy;->onNetwork()V (greylist, linking, allowed)
Кроме того, если я перезагружаю тот же экран, он снова начинает нормально работать ...
Не уверен, помогает ли это, но устройство OnePlus 7 Pro.