小编ayu*_*ush的帖子

MissingPluginException(在通道 app.meedu/flutter_facebook_auth 上找不到方法登录的实现):Flutter

我正在尝试在 Flutter 中使用 Facebook 身份验证。我按照给定的正确顺序执行了所有步骤 - https://facebook.meedu.app/docs/4.xx/android
https://developers.facebook.com/docs/facebook-login/android/ 但是,当我重新启动我的应用程序(正如许多其他答案中所述),我仍然收到错误-

MissingPluginException(在频道 app.meedu/flutter_facebook_auth 上找不到方法登录的实现)

我在控制台中看到这一行,没有任何类型的其他异常。这就是为什么我无法弄清楚问题出在哪里。

清单文件-

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.social_media_login">
    <queries>
        <provider android:authorities="com.facebook.katana.provider.PlatformProvider" /> <!-- allows app to access Facebook app features -->
        <provider android:authorities="com.facebook.orca.provider.PlatformProvider" /> <!-- allows sharing to Messenger app -->
    </queries>
    <uses-permission android:name="android.permission.INTERNET"/>

    <application
        android:label="social_media_login"
        android:name="${applicationName}"
        android:icon="@mipmap/ic_launcher">
        <activity
            android:name=".MainActivity"
            android:exported="true"
            android:launchMode="singleTop"
            android:theme="@style/LaunchTheme"
            android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
            android:hardwareAccelerated="true"
            android:windowSoftInputMode="adjustResize">
            <!-- Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user …
Run Code Online (Sandbox Code Playgroud)

authentication android metadata facebook-authentication flutter

6
推荐指数
3
解决办法
6968
查看次数

无法在“OverlayState”上访问属性“context”?因为它可能为空:Flutter

我正在 flutter 中制作一个文本编辑器应用程序并想要使用 -
https://pub.dev/packages/flutter_quill
但是,当我在添加依赖项后尝试构建项目时,出现以下错误 -

/D:/flutter_windows_2.10.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_quill-6.3.2/lib/src/widgets/toolbar/quill_font_size_button.dart:113:41: Error: Property 'context' cannot be accessed on 'OverlayState?' because it is potentially null.
- 'OverlayState' is from 'package:flutter/src/widgets/overlay.dart' ('/D:/flutter_windows_2.10.5-stable/flutter/packages/flutter/lib/src/widgets/overlay.dart').
Try accessing using ?. instead.
    final overlay = Overlay.of(context).context.findRenderObject() as RenderBox;
                                        ^^^^^^^
/D:/flutter_windows_2.10.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_quill-6.3.2/lib/src/widgets/toolbar/quill_font_family_button.dart:112:41: Error: Property 'context' cannot be accessed on 'OverlayState?' because it is potentially null.
- 'OverlayState' is from 'package:flutter/src/widgets/overlay.dart' ('/D:/flutter_windows_2.10.5-stable/flutter/packages/flutter/lib/src/widgets/overlay.dart').
Try accessing using ?. instead.
    final overlay = Overlay.of(context).context.findRenderObject() as RenderBox;
                                        ^^^^^^^
/D:/flutter_windows_2.10.5-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_quill-6.3.2/lib/src/widgets/text_selection.dart:87:61: Error: The argument type 'OverlayState?' can't be assigned …
Run Code Online (Sandbox Code Playgroud)

android rich-text-editor quill flutter

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

ClassCastException:带有加载器“app”的未命名模块:Spring Data Redis

我正在为Redis 和 Spring Boot 开发一个小型演示项目。但对于以下GET端点,我收到ClassCastException。-

@GetMapping("/all")
    public List<Product> getAllProducts(){
        return productRepository.findAll();
    }

    @GetMapping("/product/{id}")
    public Product finProduct(@PathVariable int id){
        return productRepository.findProductById(id);
    }
Run Code Online (Sandbox Code Playgroud)

服务-

public List<Product> findAll() {
        List<Product> products=new ArrayList<>();
        redisTemplate.opsForHash().values(HASH_KEY).forEach(e->products.add((Product)e));
        return products;
    }

    public Product findProductById(int id) {

        return (Product) redisTemplate.opsForHash().get(HASH_KEY, id);
    }
Run Code Online (Sandbox Code Playgroud)

我收到以下错误 -

java.lang.ClassCastException: class com.ayushsingh.springdataredisdemo.entity.Product cannot be cast to class com.ayushsingh.springdataredisdemo.entity.Product (com.ayushsingh.springdataredisdemo.entity.Product is in unnamed module of loader 'app'; com.ayushsingh.springdataredisdemo.entity.Product is in unnamed module of loader org.springframework.boot.devtools.restart.classloader.RestartClassLoader @18f69edd)
Run Code Online (Sandbox Code Playgroud)

我引用了以下文章: https: //medium.com/javarevisited/classcast-exception-when-using-redis-and-springboot-frameworks-in-conjunction-ea132dd0d7ea …

java spring classcastexception spring-data-redis spring-boot

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

java.lang.ClassNotFoundException:jakarta.servlet.http.HttpServlet:Spring MVC 和 Eclipse

我正在使用Spring MVC 和 Eclipse IDE创建一个 Web 应用程序。 Spring 版本 - 6.0.3
要配置项目,我按照以下步骤操作 -

  1. 在pom.xml中添加了依赖项 -
 <dependencies>
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <version>4.11</version>
      <scope>test</scope>
    </dependency>
    <!-- Spring MVC Dependency -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>6.0.3</version>
        </dependency>
  </dependencies>
Run Code Online (Sandbox Code Playgroud)
  1. 将 Tomcat 服务器运行时添加到构建路径 - 在此输入图像描述

  2. 添加了Maven 依赖项到部署程序集 - 在此输入图像描述

  3. web.xml-(在 WEB-INF 文件夹中)

<web-app>
    <display-name>Spring MVC Demo</display-name>

    <!-- Configure dispatcher servlet -->
    <servlet>
        <servlet-name>dispatcherservlet</servlet-name>
        <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
    </servlet>
    <servlet-mapping>
        <servlet-name>dispatcherservlet</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>
    <!-- / means handle all the requests from all urls -->
</web-app>
Run Code Online (Sandbox Code Playgroud)
  1. Dispatcherservlet-servlet.xml(在 WEB-INF 文件夹中) …

spring servlets spring-mvc maven jakarta-migration

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

deleteById() 方法不适用于 ManyToMany 映射:Spring Boot 和 JPA

我有一个场景,其中策略实体表之间有一个多对多映射。这是实体代码-InsurancePolicy.java-

@Entity
@Table(name = "insurance_policy")

public class InsurancePolicy {
    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    @Column(name="policy_id")
    private long policyId;

    @Column(name="policy_name",nullable = false,unique = true)
    private String policyName;

    //Short description
    @Column(name="policy_description",nullable = false)
    private String policyDescription;

    //Long description
    @Column(name="choose_description",nullable = false)
    private String chooseDescription;


    //many policies can belong to one category
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "company_id", nullable = false)
    private Company company;

    //many policies can belong to one category
    @ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="category_id",nullable=false)
    private Category category;

    @ManyToMany(mappedBy …
Run Code Online (Sandbox Code Playgroud)

java cascade cascading-deletes spring-data-jpa spring-boot

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