【发布时间】:2019-10-01 05:39:55
【问题描述】:
在运行控制台期间,image_picker_saver 包导致 AndroidX 无法兼容。 包是 - image_picker_saver: ^0.1.0
谁能帮忙处理这个错误?
运行控制台-
^
symbol: variable ActivityCompat
C:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker_saver-0.1.0\android\src\main\java\io\flutter\plugins\imagepickersaver\ImagePickerDelegate.java:139: error: cannot find symbol
ActivityCompat.requestPermissions(activity, new String[]{permissionName}, requestCode);
^
symbol: variable ActivityCompat
C:\flutter\.pub-cache\hosted\pub.dartlang.org\image_picker_saver-0.1.0\android\src\main\java\io\flutter\plugins\imagepickersaver\ImagePickerDelegate.java:151: error: cannot find symbol
return FileProvider.getUriForFile(activity, fileProviderName, file);
^
symbol: variable FileProvider
20 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':image_picker_saver:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 1m 36s
*******************************************************************************************
The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
【问题讨论】: