这就是我在添加“simple_permissions”包时看到的错误。我怎么才能修好这个?我最近升级了flutter,在升级之前它一直工作得很好。/root/flutter/.pub-cache/hosted/pub.dartlang.org/simple_permissions-0.1.9/android/src/main/java/com/ethras/simplepermission/simplepermissionsplugin.java:9:错误:找不到符号导入Android.support.v4.app.activitycompat;
/root/flutter/.pub-cache/hosted/pub.dartlang.org/simple_permissions-0.1.9/android/src/main/java/com/ethras/simplepermissions/SimplePermissionsPlugin.java:9: error: cannot find symbol
import android.support.v4.app.ActivityCompat;
symbol: class ActivityCompat
location: package android.support.v4.app
/root/flutter/.pub-cache/hosted/pub.dartlang.org/simple_permissions-0.1.9/android/src/main/java/com/ethras/simplepermissions/SimplePermissionsPlugin.java:10: error: package android.support.v4.content does not exist
import android.support.v4.content.ContextCompat;
^
/root/flutter/.pub-cache/hosted/pub.dartlang.org/simple_permissions-0.1.9/android/src/main/java/com/ethras/simplepermissions/SimplePermissionsPlugin.java:156: error: cannot find symbol
ActivityCompat.requestPermissions(activity, perm, 0);
^
symbol: variable ActivityCompat
location: class SimplePermissionsPlugin
/root/flutter/.pub-cache/hosted/pub.dartlang.org/simple_permissions-0.1.9/android/src/main/java/com/ethras/simplepermissions/SimplePermissionsPlugin.java:163: error: cannot find symbol
return PackageManager.PERMISSION_GRANTED == ContextCompat.checkSelfPermission(activity, permission);
symbol: variable ContextCompat
location: class SimplePermissionsPlugin
/root/flutter/.pub-cache/hosted/pub.dartlang.org/simple_permissions-0.1.9/android/src/main/java/com/ethras/simplepermissions/SimplePermissionsPlugin.java:171: error: cannot find symbol
if (ActivityCompat.shouldShowRequestPermissionRationale(registrar.activity(), permission)) {
^
symbol: variable ActivityCompat
location: class SimplePermissionsPlugin
/root/flutter/.pub-cache/hosted/pub.dartlang.org/simple_permissions-0.1.9/android/src/main/java/com/ethras/simplepermissions/SimplePermissionsPlugin.java:175: error: cannot find symbol
if (ActivityCompat.checkSelfPermission(registrar.context(), permission) == PackageManager.PERMISSION_GRANTED) {
^
symbol: variable ActivityCompat
location: class SimplePermissionsPlugin
6 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':simple_permissions: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 3s
The built failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetfier to solve the incompatibility.
[!] Flutter tried to create the file `android/settings_aar.gradle`, but failed.
To manually update `settings.gradle`, follow these steps:
1. Copy `settings.gradle` as `settings_aar.gradle`
2. Remove the following code from `settings_aar.gradle`:
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
def properties = new Properties()
assert localPropertiesFile.exists()
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
def flutterSdkPath = properties.getProperty("flutter.sdk")
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
Exception: Please create the file and run this command again.
Exited (sigterm)
我建议你先检查一下包装再用。
似乎simple_permissions
已经过时了,这个包自2018年以来就没有更新过,它的存储库也从github中消失了,请考虑使用其他包,如permission_handler
。
干杯。
我试图从djangotoolbox.fields使用Listfield,但它给我一个错误说: 我做错了什么?
问题内容: 我在测试应用程序时未在手机上找到它。为什么会发生这种情况,我该如何解决? 我还不知道,但我想我可以与有同样的问题 和如果他们这样做会引起其他问题。 我以前从未遇到过任何问题,但现在无法正常工作。我有android.support.v4 lib(可能是一个)。 编辑:更好的错误消息 我的错误 问题答案: 如果您最近更新了ADT,则库构建路径可能已被弄乱了。请尝试以下操作: 右键单击项目
我正在尝试使用相机并保存图像。按照Commonware建议的步骤进行操作。我经常出错- 2018-11-12 02:10:54.588 3145-3173/inder.execE/Database aseUtils:写入异常到包裹inder.java:682安全异常:权限拒绝:写入android.support.v4.content.FileProvider uricontent://com.bi
可以将本地文档导入到幕布中,也可以将幕布中的文档导出到本地,支持Word、PDF、HTML、OPML、FreeMind等多种格式。 导入 在文档列表主页面点击「新建」,可以选择导入OPML文件(.opml格式)或者FreeMind文件(.mm格式)。 导出 在文档编辑页面点击右上角「更多」选项: 导出/下载:将该文档导出到本地,支持Word、PDF、HTML、OPML格式; 打印:使用打印机打印该
导入向导 让你从 CSV、TXT、XML、DBF 以及更多格式导入数据到表。你可以保存设置成设置文件用作设置计划。注意:Navicat Essentials 只支持导入基于文本的文件,例如 TXT、CSV、HTML、XML 和 JSON 文件。 要打开导入向导,从表的对象列表工具栏点击 导入向导。 提示:你可以拖曳一个支持的文件到表的对象列表窗格或到连接窗格的一个数据库或模式。Navicat 将会