gpt4 book ai didi

gradle - android_intent错误,首先安装Flutter插件

转载 作者:行者123 更新时间:2023-12-03 03:41:13 25 4
gpt4 key购买 nike

这是我第一次在应用程序中安装Android_intent插件,在实验过程中,我在简单的应用程序中安装了插件,并且插件运行良好,但是当我在应用程序中执行相同的操作时,我实际上有了一个不再起作用的插件。但是当我安装它时,出现了这样的错误:

/home/denis/AndroidStudioProjects/spmi_conference/build/android_intent/generated/source/buildConfig/debug/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:23: error: duplicate class: io.flutter.plugins.androidintent.AndroidIntentPlugin
public class AndroidIntentPlugin implements MethodCallHandler {
^
/home/denis/Documents/DENISDATA/Jobs/2018/test/flutter/development/flutter/.pub-cache/hosted/pub.dartlang.org/android_intent-0.3.0+2/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:13: error: package io.flutter.plugin.common does not exist
import io.flutter.plugin.common.MethodCall;
^
/home/denis/Documents/DENISDATA/Jobs/2018/test/flutter/development/flutter/.pub-cache/hosted/pub.dartlang.org/android_intent-0.3.0+2/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:14: error: package io.flutter.plugin.common does not exist
import io.flutter.plugin.common.MethodChannel;
^
/home/denis/Documents/DENISDATA/Jobs/2018/test/flutter/development/flutter/.pub-cache/hosted/pub.dartlang.org/android_intent-0.3.0+2/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:15: error: package io.flutter.plugin.common.MethodChannel does not exist
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
^
/home/denis/Documents/DENISDATA/Jobs/2018/test/flutter/development/flutter/.pub-cache/hosted/pub.dartlang.org/android_intent-0.3.0+2/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:16: error: package io.flutter.plugin.common.MethodChannel does not exist
import io.flutter.plugin.common.MethodChannel.Result;
^
/home/denis/Documents/DENISDATA/Jobs/2018/test/flutter/development/flutter/.pub-cache/hosted/pub.dartlang.org/android_intent-0.3.0+2/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:17: error: package io.flutter.plugin.common.PluginRegistry does not exist
import io.flutter.plugin.common.PluginRegistry.Registrar;
^
/home/denis/Documents/DENISDATA/Jobs/2018/test/flutter/development/flutter/.pub-cache/hosted/pub.dartlang.org/android_intent-0.3.0+2/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:23: error: cannot find symbol
public class AndroidIntentPlugin implements MethodCallHandler {
^
symbol: class MethodCallHandler
/home/denis/Documents/DENISDATA/Jobs/2018/test/flutter/development/flutter/.pub-cache/hosted/pub.dartlang.org/android_intent-0.3.0+2/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:25: error: cannot find symbol
private final Registrar mRegistrar;
^
symbol: class Registrar
location: class AndroidIntentPlugin
/home/denis/Documents/DENISDATA/Jobs/2018/test/flutter/development/flutter/.pub-cache/hosted/pub.dartlang.org/android_intent-0.3.0+2/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:28: error: cannot find symbol
public static void registerWith(Registrar registrar) {
^
symbol: class Registrar
location: class AndroidIntentPlugin
/home/denis/Documents/DENISDATA/Jobs/2018/test/flutter/development/flutter/.pub-cache/hosted/pub.dartlang.org/android_intent-0.3.0+2/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:34: error: cannot find symbol
private AndroidIntentPlugin(Registrar registrar) {
^
symbol: class Registrar
location: class AndroidIntentPlugin
/home/denis/Documents/DENISDATA/Jobs/2018/test/flutter/development/flutter/.pub-cache/hosted/pub.dartlang.org/android_intent-0.3.0+2/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:117: error: cannot find symbol
public void onMethodCall(MethodCall call, Result result) {
^
symbol: class MethodCall
location: class AndroidIntentPlugin
/home/denis/Documents/DENISDATA/Jobs/2018/test/flutter/development/flutter/.pub-cache/hosted/pub.dartlang.org/android_intent-0.3.0+2/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:117: error: cannot find symbol
public void onMethodCall(MethodCall call, Result result) {
^
symbol: class Result
location: class AndroidIntentPlugin
/home/denis/AndroidStudioProjects/spmi_conference/build/android_intent/generated/source/buildConfig/debug/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:13: error: package io.flutter.plugin.common does not exist
import io.flutter.plugin.common.MethodCall;
^
/home/denis/AndroidStudioProjects/spmi_conference/build/android_intent/generated/source/buildConfig/debug/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:14: error: package io.flutter.plugin.common does not exist
import io.flutter.plugin.common.MethodChannel;
^
/home/denis/AndroidStudioProjects/spmi_conference/build/android_intent/generated/source/buildConfig/debug/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:15: error: package io.flutter.plugin.common.MethodChannel does not exist
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
^
/home/denis/AndroidStudioProjects/spmi_conference/build/android_intent/generated/source/buildConfig/debug/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:16: error: package io.flutter.plugin.common.MethodChannel does not exist
import io.flutter.plugin.common.MethodChannel.Result;
^
/home/denis/AndroidStudioProjects/spmi_conference/build/android_intent/generated/source/buildConfig/debug/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:17: error: package io.flutter.plugin.common.PluginRegistry does not exist
import io.flutter.plugin.common.PluginRegistry.Registrar;
^
/home/denis/Documents/DENISDATA/Jobs/2018/test/flutter/development/flutter/.pub-cache/hosted/pub.dartlang.org/android_intent-0.3.0+2/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:29: error: cannot find symbol
final MethodChannel channel =
^
symbol: class MethodChannel
location: class AndroidIntentPlugin
/home/denis/Documents/DENISDATA/Jobs/2018/test/flutter/development/flutter/.pub-cache/hosted/pub.dartlang.org/android_intent-0.3.0+2/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:30: error: cannot find symbol
new MethodChannel(registrar.messenger(), "plugins.flutter.io/android_intent");
^
symbol: class MethodChannel
location: class AndroidIntentPlugin
/home/denis/Documents/DENISDATA/Jobs/2018/test/flutter/development/flutter/.pub-cache/hosted/pub.dartlang.org/android_intent-0.3.0+2/android/src/main/java/io/flutter/plugins/androidintent/AndroidIntentPlugin.java:116: error: method does not override or implement a method from a supertype
@Override
^
20 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':android_intent: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 2s
Finished with error: Gradle task assembleDebug failed with exit code 1


我已经尝试了几天。
我的代码错了吗?
有人能帮我吗?谢谢
最好的祝福。

最佳答案

将此代码添加到项目的android build Gradle文件中。

subprojects {
project.evaluationDependsOn(':app')
project.configurations.all {
resolutionStrategy.eachDependency { details ->

if (details.requested.group == 'androidx.core'
&& !details.requested.name.contains('androidx')) {
details.useVersion "1.0.1"
}


}
}
}

在再次尝试之前,请不要忘记清理您的项目。

关于gradle - android_intent错误,首先安装Flutter插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55624415/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com