您好,在 MacBook Air M1 芯片 Lap 中运行 flutter 项目时遇到问题。尝试了所有的可能性都找不到具体问题出在哪里。
\n所有基本解决方案如flutter clean, flutter pub get, pod deintegrate & install, flutter build ios, flutter run,但仍然是相同的问题。仅在未部署的 iOS 模拟器上。
任何解决方案。提前致谢。
\n错误
\nLaunching lib/main.dart on iPhone 13 in debug mode...\nRunning pod install... 5.3s\nRunning Xcode build... \nXcode build done. 104.1s\nFailed to build iOS app\nError output from Xcode build:\n\xe2\x86\xb3\n objc[25282]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libamsupport.dylib (0x203913130) and\n /Library/Apple/System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x103bc02c8). One of the two will be used. Which one is …Run Code Online (Sandbox Code Playgroud) 我最近在 Play 商店上发布了我的应用程序,并且收到了大量崩溃报告,如下所示。
Fatal Exception: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.mynewsapp/com.mynewsapp.MainActivity}: java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.mynewsapp-gPJd8MyNcgdyJYrEzcZOUw==/base.apk"],nativeLibraryDirectories=[/data/app/com.mynewsapp-gPJd8MyNcgdyJYrEzcZOUw==/lib/arm64, /system/lib64, /product/lib64]]] couldn't find "libflutter.so"
Run Code Online (Sandbox Code Playgroud)
我们知道 flutter 不支持 aab 上的 x86,但这是由于 lib/arm64 找不到“libflutter.so”而发生的。因此,我提取了发布的 aab 文件,它在 lib arm64-v8a、armeabi-v7a 和 x86_64 下只有这些文件夹。
谁能帮我解决这个问题吗?为什么arm64文件夹没有?这些用户是谁?
实际上在颤振中DateTime.now()是返回设备日期和时间。用户有时会改变他们的内部时钟,使用DateTime.now()可能会产生错误的结果。
提前致谢!
如何通过区域、存储桶 ID、访问密钥和秘密密钥对 IAM 角色用户进行身份验证,并获取视频文件对象并在视频播放器中播放。实际上,我们已经在 AWS S3 中上传了视频文件,并向一名 IAM 角色用户授予了访问权限。
现在,在 flutter 应用程序中,我需要通过 accesskey、secretkey 对 IAM 用户进行身份验证,并获取视频对象并在视频播放器中播放,而无需在本地保存或下载。
我尝试使用插件,
flutter_aws_s3_client: ^0.5.0
const region = "<region>";
const bucketId = "<bucket id>";
final AwsS3Client s3client = AwsS3Client(
region: region,
host: "s3.$region.amazonaws.com",
bucketId: bucketId,
accessKey: "<accesskey>",
secretKey: "<secretkey>");
//object video name
final response = await s3client.getObject("example_test.m3u8");
Run Code Online (Sandbox Code Playgroud)
这里我得到的对象响应为 200,但是我如何传递并在视频播放器中播放这个视频文件?有什么办法吗?我尝试在expo播放器android video_player_plugin.dart中添加标题。但没有运气。
视频播放器插件
video_player: ^0.10.11+1
class _VideoAppState extends State<VideoApp> {
VideoPlayerController _controller;
@override
void initState() {
super.initState();
_controller = VideoPlayerController.network('//need to pass the videoUrl of AWS S3')
..initialize().then((_) …Run Code Online (Sandbox Code Playgroud) 我在方向横向模式下的全屏视图中遇到问题,问题仅出现在某些设备上,诺基亚、红米和一加在横向模式下屏幕左侧未完全覆盖。附上下面的屏幕截图
左侧那个空间是我的手机壁纸,小部件没有覆盖全屏。那么我该如何解决这个问题呢?
class TestPage extends StatefulWidget {
@override
_TestPageState createState() => _TestPageState();
}
class _TestPageState extends State<TestPage> {
bool isFullScreen = false;
/* To Update Screen Resolution Normal */
void updateResolutionNormal() {
SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeRight,
DeviceOrientation.landscapeLeft,
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
}
/* To Update Screen Resolution LandscapeLeft,LandscapeRight */
void updateResolutionLandscape() {
SystemChrome.setPreferredOrientations([
DeviceOrientation.landscapeRight,
DeviceOrientation.landscapeLeft,
]);
}
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.white,
body: Container(
child: GestureDetector(
onTap: () {
setState(() {
isFullScreen = !isFullScreen;
if (isFullScreen) {
updateResolutionLandscape();
} …Run Code Online (Sandbox Code Playgroud) Flutter 不会创建 x86 apk,但会创建其他三个 apk。
\n最近发布的 Android 应用程序 firebase 崩溃,并提示x86 无法找到“libflutter.so”。所以我认为我们已经在 x86 lib 文件夹中发布了一个捆绑应用程序,或者相关的 lib 可能未创建,因此发生了崩溃。我尝试使用flutter build apk --split-per-abi其创建的三个文件“arm64-v8a”、“armeabi-v7a”、“x86_64”在本地计算机中创建一个拆分 apk ,但未创建 x86 apk我不知道也不知道我错过了任何配置?
帮帮我。提前致谢!
\nmaclap@root flutter-app-v3 % flutter build apk --split-per-abi\n\nBuilding without sound null safety\nFor more information see https://dart.dev/null-safety/unsound-null-safety\n\nRemoved unused resources: Binary resource data reduced from 1109KB to 1052KB: Removed 5%\nRemoved unused resources: Binary resource data reduced from 1109KB to 1052KB: Removed 5%\nRemoved unused resources: Binary resource data reduced …Run Code Online (Sandbox Code Playgroud) 最近,我们将 Android 应用程序目标发布到了 31 个,其中报告了 Firebase Messaging (PendingIntent) 中的更多崩溃(仅限 Android OS 12 用户)。当应用程序在通知接收上处于暂停/后台状态时,它会崩溃。我已经尝试了可能的解决方案,但运气不佳仍然崩溃。据我了解,我们必须在 PendingIntent 启动活动上添加 PendingIntent.FLAG_IMMUTABLE,但不知道如何添加或修复此问题。
如果有人遇到同样的问题并修复。分享一下这个问题的解决方案。
提前致谢...
dependencies{
implementation platform('com.google.firebase:firebase-bom')
implementation 'com.google.firebase:firebase-messaging'
implementation 'com.google.firebase:firebase-iid'
implementation 'com.google.firebase:firebase-analytics:17.4.4'
implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
}
Run Code Online (Sandbox Code Playgroud)
E/AndroidRuntime( 7058): java.lang.IllegalArgumentException: com.package: Targeting S+ (version 31 and above) requires that one of FLAG_IMMUTABLE or FLAG_MUTABLE be specified when creating a PendingIntent.
E/AndroidRuntime( 7058): Strongly consider using FLAG_IMMUTABLE, only use FLAG_MUTABLE if some functionality depends on the PendingIntent being mutable, e.g. if it needs to be used with inline …Run Code Online (Sandbox Code Playgroud)