gdut-yy / OpenFlutterYim

[个人毕业设计项目]-基于Flutter的聊天社交应用-开源版本
138 stars 46 forks source link

大佬,插件和AndroidX不兼容,报错了呀,怎么解决求指点^_^ #1

Open junlandroid opened 5 years ago

junlandroid commented 5 years ago

报错信息: `Running Gradle task 'assembleDebug'... ע: D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\xservice_kit-0.0.29\android\src\main\java\fleamarket\taobao\com\xservicekit\service\ServiceTemplate.javaʹ�û򸲸����ѹ�ʱ�� API�� ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:deprecation ���±��롣 ע: D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\xservice_kit-0.0.29\android\src\main\java\fleamarket\taobao\com\xservicekit\handler\flutter\FlutterMessageDispatcher.javaʹ����δ�����򲻰�ȫ�IJ����� ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:unchecked ���±��롣 D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\BoostFlutterView.java:29: ����: �����android.support.v4.view������ import android.support.v4.view.ViewCompat; ^ D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\containers\BoostFlutterFragment.java:29: ����: �Ҳ������� import android.support.v4.app.Fragment; ^ ����: �� Fragment λ��: ����� android.support.v4.app D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\containers\BoostFlutterFragment.java:47: ����: �Ҳ������� abstract public class BoostFlutterFragment extends Fragment implements IFlutterViewContainer { ^ ����: �� Fragment D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\BoostFlutterNativeView.java:36: ����: �������Ḳ�ǻ�ʵ�ֳ����͵ķ��� @Override ^ D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\BoostFlutterView.java:210: ����: �Ҳ������� ViewCompat.requestApplyInsets(this); ^ ����: ��� ViewCompat λ��: �� BoostFlutterView D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\containers\BoostFlutterFragment.java:54: ����: �������Ḳ�ǻ�ʵ�ֳ����͵ķ��� @Override ^ D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\containers\BoostFlutterFragment.java:56: ����: �Ҳ������� super.onCreate(savedInstanceState); ^ ����: ��� super λ��: �� BoostFlutterFragment D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\containers\BoostFlutterFragment.java:62: ����: �������Ḳ�ǻ�ʵ�ֳ����͵ķ��� @Override ^ D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\containers\BoostFlutterFragment.java:64: ����: �Ҳ������� super.onCreateView(inflater, container, savedInstanceState); ^ ����: ��� super λ��: �� BoostFlutterFragment D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\containers\BoostFlutterFragment.java:69: ����: �������Ḳ�ǻ�ʵ�ֳ����͵ķ��� @Override ^ D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\containers\BoostFlutterFragment.java:71: ����: �Ҳ������� super.onResume(); ^ ����: ��� super λ��: �� BoostFlutterFragment D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\containers\BoostFlutterFragment.java:80: ����: �������Ḳ�ǻ�ʵ�ֳ����͵ķ��� @Override ^ D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\containers\BoostFlutterFragment.java:82: ����: �Ҳ������� super.onPause(); ^ ����: ��� super λ��: �� BoostFlutterFragment D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\containers\BoostFlutterFragment.java:91: ����: �������Ḳ�ǻ�ʵ�ֳ����͵ķ��� @Override ^ D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\containers\BoostFlutterFragment.java:93: ����: �Ҳ������� super.onDestroy(); ^ ����: ��� super λ��: �� BoostFlutterFragment D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\containers\BoostFlutterFragment.java:121: ����: �Ҳ������� FrameLayout layout = new FrameLayout(getContext()); ^ ����: ���� getContext() λ��: �� BoostFlutterFragment D:\dev_tools\flutter_windows_v1.5.4-hotfix.2-stable\flutter.pub-cache\hosted\pub.flutter-io.cn\flutter_boost-0.0.411\android\src\main\java\com\taobao\idlefish\flutterboost\containers\BoostFlutterFragment.java:125: ����: �Ҳ������� layout.addView(new ProgressBar(getContext()),params); ^ ����: ���� getContext() λ��: �� BoostFlutterFragment ע: ijЩ�����ļ�ʹ����δ�����򲻰�ȫ�IJ����� ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:unchecked ���±��롣 17 ������


The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app. See https://goo.gl/CP92wY for more information on the problem and how to fix it.


Finished with error: Gradle task assembleDebug failed with exit code 1`

项目中dependencies dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1' implementation 'androidx.legacy:legacy-support-v4:1.0.0' implementation 'androidx.appcompat:appcompat:1.0.2' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'androidx.recyclerview:recyclerview:1.0.0' implementation 'com.google.android.material:material:1.0.0' // Optional compile for GCM (Google Cloud Messaging). implementation 'com.google.android.gms:play-services-gcm:16.1.0' implementation 'com.hyphenate:hyphenate-sdk:3.5.5' // glide implementation 'com.github.bumptech.glide:glide:3.7.0' }

刚配好flutter环境,新手见谅。 初步认为,插件的版本与依赖的AndroidX版本不兼容。如何解决呢?求指点。

gdut-yy commented 5 years ago

建议全面将support包改为androidx包

gdut-yy commented 5 years ago

使用as打开项目的android目录,把flutterboostplugin中有关依赖改为androidx即可解决。并且推荐在android子目录下进行编译而不是项目的根目录进行编译,希望能解决你的问题

RxGirlz commented 5 years ago

BoostFlutterView.java ViewCompat android.support => androidx BoostFlutterFragment.java Fragment android.support => androidx BoostFlutterNativeView.java 去掉 detach 的 @Override