小编Rat*_*rty的帖子

Flutter AppUpdateService linkToDeath

I have been trying to add the in app update feature to make the user update the app when there is a new update available in the playstore. I am using the package in_app_update.

But it keeps throwing this error,

I/PlayCore( 8420): UID: [10378]  PID: [8420] AppUpdateService : requestUpdateInfo(com.example.app)
I/PlayCore( 8420): UID: [10378]  PID: [8420] AppUpdateService : Initiate binding to the service.
I/PlayCore( 8420): UID: [10378]  PID: [8420] AppUpdateService : ServiceConnectionImpl.onServiceConnected(ComponentInfo{com.android.vending/com.google.android.finsky.installservice.DevTriggeredUpdateService})
I/PlayCore( 8420): UID: [10378]  PID: [8420] AppUpdateService : …
Run Code Online (Sandbox Code Playgroud)

android ios dart flutter in-app-update

11
推荐指数
1
解决办法
2077
查看次数

如何解决 flutter_local_notifications PlatformException 错误?

flutter_local_notifications第一次在项目中使用包。

遵循pub.dev站点文档中给出的代码。但问题是当我按下应该触发通知的按钮时,它会导致PlatformException错误。

错误

E/flutter (15180): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: PlatformException(error, Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference, null)
E/flutter (15180): #0      StandardMethodCodec.decodeEnvelope (package:flutter/src/services/message_codecs.dart:569:7)
E/flutter (15180): #1      MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:318:33)
E/flutter (15180): <asynchronous suspension>
E/flutter (15180): #2      FlutterLocalNotificationsPlugin.show (package:flutter_local_notifications/src/flutter_local_notifications.dart:120:20)
E/flutter (15180): <asynchronous suspension>
E/flutter (15180): #3      _NewsfeedState.showNotification (package:news_app/screens/newsfeed_screen.dart:129:43)

Run Code Online (Sandbox Code Playgroud)

代码如下。

初始化状态()

  @override
  void initState() {
   super.initState();

    var android = AndroidInitializationSettings('mipmap-hdpi/ic_launcher.png');
    var ios = IOSInitializationSettings();
    var initSettings = InitializationSettings(android, ios);
    flutterLocalNotificationsPlugin.initialize(initSettings, onSelectNotification: onSelectNotification);

} …
Run Code Online (Sandbox Code Playgroud)

android ios dart flutter

10
推荐指数
1
解决办法
3000
查看次数

Android Studio:adb 拒绝 shell 命令 (getprop) 关闭

当我尝试在 android studio 中使用虚拟设备模拟我的应用程序时,我一直在处理这个错误一个星期。

Adb 拒绝 shell 命令 (getprop) 关闭

我尝试根据设备更新 SDK,重新启动它,但这些都没有帮助。我进行了搜索,但没有找到任何解决此特定错误的答案。

一些线索将意味着很大的帮助。谢谢。

(一个卑微的请求,如果你不喜欢这个问题,请投反对票,但仍然不要使用辱骂性的话)

java mobile emulation

8
推荐指数
0
解决办法
1988
查看次数

mongoose 模型没有通过 req.params.id 删除时,如何修复它的 deleteOne() 函数?

首先要提到的是,我对 Node.Js 和 MongoDB 完全陌生。

我正在使用 Node.Js 和 MongoDB 编写后端 API,它将处理来自前端的 GET、POST、DELETE 请求,非常简单。

我在使用 DELETE 功能时被卡住了。

这是我的posts.service.ts文件,其中包含此deletePost()函数,该函数将 postId 发送到后端app.js文件。

`

deletePost(postId: string) {
    this.http.delete('http://localhost:3000/api/posts/' + postId)
    .subscribe(() => {
      console.log(postId);
      console.log('Deleted');
    });
  }
Run Code Online (Sandbox Code Playgroud)

`

我添加了这个console.log(postId)来检查它是否真的包含实际的 postId 并发现它确实包含。我还通过检查 mongo shell 将其与 MongoDB 中的真实 Id 进行了匹配。

这是后端app.js文件中的delete()函数,它应该执行实际任务。

`

app.delete("/api/posts/:id", (req, res, next) => {
  Post.deleteOne({ _id: req.params.id }).then(result => {
    console.log(result);
    res.status(200).json({message: "Post deleted"});
  });
});
Run Code Online (Sandbox Code Playgroud)

`

执行console.log(结果)线应打印一些结果在终端,但它并没有,所以没有它在数据库中删除集合。 …

javascript mongoose mongodb node.js

5
推荐指数
1
解决办法
7459
查看次数

Flutter MaterialPageRoute 导航到黑色背景屏幕时如何解决?

我第一次在我的一个报纸应用项目中使用 Flutter。

问题发生时,我尝试从导航main.dartnewsfeed_for_other_category.dart使用MaterialPageRoute从我的Drawer。在该屏幕中,它显示新闻,但背景为黑色。但是在newsfeed_screen.dart我的身体中调用的屏幕中main.dart它显示得很好。

我在下面发布代码。

main.dart

import 'package:flutter/material.dart';
import './SizeConfig.dart';
import './screens/newsfeed_screen.dart';
import 'package:curved_navigation_bar/curved_navigation_bar.dart';
import 'factory/widget_factory.dart';
import 'widgets/top_news_widget.dart';
import 'package:splashscreen/splashscreen.dart';
import './widgets/drawer.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Newspaper App',
      theme: ThemeData(
        primarySwatch: Colors.blue,
        //backgroundColor: Colors.lightGreenAccent,
      ),
      home: MyHomePage(title: 'The Business Standard'),
      routes: <String, WidgetBuilder> {
        '/screen1': (BuildContext context) …
Run Code Online (Sandbox Code Playgroud)

mobile android ios flutter

4
推荐指数
1
解决办法
4171
查看次数

Laravel找不到css文件:GET http:// localhost:8000/cssFile net :: ERR_ABORTED

我的laravel项目没有找到任何页面的任何css文件.它显示错误,

GET http://localhost:8000/dashboard.css net::ERR_ABORTED
Run Code Online (Sandbox Code Playgroud)

没有找到太多类似的问题,但尝试了我找到的一些解决方案,但显然那些没有帮助,否则我不会再问.

我正在使用Ubuntu PC.

这是我尝试过的一切.

  1. 检查文件权限,所有文件都具有所有read, write and execution权限.
  2. 尝试多次重启localhost.
  3. 尝试使用该asset()功能,<link rel="stylesheet" type="text/css" href="{{asset('dashboard.css')}}">
  4. 尝试使用绝对路径虽然我有与css文件在同一目录中的blade.php文件.

上述方法都没有修复它.一些线索会帮助我很多.谢谢.

css php ubuntu laravel

0
推荐指数
1
解决办法
74
查看次数