安卓开发fragment报错_android混合开发sync之后运行项目Flutter和FlutterFragment里面报错...

Task :flutter:compileDebugJavaWithJavac FAILED

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/FlutterFragment.java:5: 错误: 程序包android.support.annotation不存在

import android.support.annotation.NonNull;

^

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/FlutterFragment.java:6: 错误: 找不到符号

import android.support.v4.app.Fragment;

^

符号: 类 Fragment

位置: 程序包 android.support.v4.app

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/FlutterFragment.java:19: 错误: 找不到符号

public class FlutterFragment extends Fragment {

^

符号: 类 Fragment

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/Flutter.java:4: 错误: 程序包android.arch.lifecycle不存在

import android.arch.lifecycle.Lifecycle;

^

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/Flutter.java:5: 错误: 程序包android.arch.lifecycle不存在

import android.arch.lifecycle.LifecycleObserver;

^

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/Flutter.java:6: 错误: 程序包android.arch.lifecycle不存在

import android.arch.lifecycle.OnLifecycleEvent;

^

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/Flutter.java:9: 错误: 程序包android.support.annotation不存在

import android.support.annotation.NonNull;

^

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/Flutter.java:70: 错误: 找不到符号

public static FlutterView createView(@NonNull final Activity activity, @NonNull final Lifecycle lifecycle, final String initialRoute) {

^

符号: 类 Lifecycle

位置: 类 Flutter

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/FlutterFragment.java:37: 错误: 找不到符号

public FlutterView onCreateView(@NonNull LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {

^

符号: 类 NonNull

位置: 类 FlutterFragment

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/Flutter.java:36: 错误: 找不到符号

public static void startInitialization(@NonNull Context applicationContext) {

^

符号: 类 NonNull

位置: 类 Flutter

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/Flutter.java:49: 错误: 找不到符号

@NonNull

^

符号: 类 NonNull

位置: 类 Flutter

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/Flutter.java:70: 错误: 找不到符号

public static FlutterView createView(@NonNull final Activity activity, @NonNull final Lifecycle lifecycle, final String initialRoute) {

^

符号: 类 NonNull

位置: 类 Flutter

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/Flutter.java:70: 错误: 找不到符号

public static FlutterView createView(@NonNull final Activity activity, @NonNull final Lifecycle lifecycle, final String initialRoute) {

^

符号: 类 NonNull

位置: 类 Flutter

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/Flutter.java:69: 错误: 找不到符号

@NonNull

^

符号: 类 NonNull

位置: 类 Flutter

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/FlutterFragment.java:23: 错误: 方法不会覆盖或实现超类型的方法

@Override

^

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/FlutterFragment.java:25: 错误: 找不到符号

super.onCreate(savedInstanceState);

^

符号: 变量 super

位置: 类 FlutterFragment

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/FlutterFragment.java:26: 错误: 找不到符号

if (getArguments() != null) {

^

符号: 方法 getArguments()

位置: 类 FlutterFragment

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/FlutterFragment.java:27: 错误: 找不到符号

mRoute = getArguments().getString(ARG_ROUTE);

^

符号: 方法 getArguments()

位置: 类 FlutterFragment

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/FlutterFragment.java:31: 错误: 方法不会覆盖或实现超类型的方法

@Override

^

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/FlutterFragment.java:33: 错误: 找不到符号

super.onInflate(context, attrs, savedInstanceState);

^

符号: 变量 super

位置: 类 FlutterFragment

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/FlutterFragment.java:36: 错误: 方法不会覆盖或实现超类型的方法

@Override

^

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/FlutterFragment.java:38: 错误: 找不到符号

return Flutter.createView(getActivity(), getLifecycle(), mRoute);

^

符号: 方法 getActivity()

位置: 类 FlutterFragment

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/FlutterFragment.java:38: 错误: 找不到符号

return Flutter.createView(getActivity(), getLifecycle(), mRoute);

^

符号: 方法 getLifecycle()

位置: 类 FlutterFragment

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/Flutter.java:54: 错误: 找不到符号

fragment.setArguments(args);

^

符号: 方法 setArguments(Bundle)

位置: 类型为FlutterFragment的变量 fragment

/Users/chenbingjian/Desktop/flutter_hybrid/flutter_module/.android/Flutter/src/main/java/io/flutter/facade/Flutter.java:91: 错误: 找不到符号

lifecycle.addObserver(new LifecycleObserver() {

^

符号: 类 LifecycleObserver

位置: 类 Flutter

25 个错误

你可能感兴趣的:(安卓开发fragment报错)