Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/flutter/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/html/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android studio Android Studio-任务';的执行失败:应用程序:CompiledBugkotlin';-未能转换工件';x86_debug.jar_Android Studio_Flutter_Gradle_Kotlin - Fatal编程技术网

Android studio Android Studio-任务';的执行失败:应用程序:CompiledBugkotlin';-未能转换工件';x86_debug.jar

Android studio Android Studio-任务';的执行失败:应用程序:CompiledBugkotlin';-未能转换工件';x86_debug.jar,android-studio,flutter,gradle,kotlin,Android Studio,Flutter,Gradle,Kotlin,我遵循了本页中的所有说明: 但是,当我尝试运行“first_应用程序”时,我得到一个错误: Android Studio-运行第一个应用程序 main.dart import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { // This widget is the root of your application. @o

我遵循了本页中的所有说明:

但是,当我尝试运行“first_应用程序”时,我得到一个错误:

Android Studio-运行第一个应用程序

main.dart

import 'package:flutter/material.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);
  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.display1,
            ),
          ],
        ),
      ),
      floatingActionButton: FloatingActionButton(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        child: Icon(Icons.add),
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
颤振医生

Doctor summary (to see all details, run flutter doctor -v): 
[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Versione 10.0.18362.720], locale it-IT)
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[√] Android Studio (version 3.6)
build.gradle(android)*

buildscript {

    ext.kotlin_version = '1.3.71'
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.6.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}
build.gradle(app/src)
gradle wrapper.properties

#Fri Jun 23 08:50:38 CEST 2017
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

测验
  • 更新的kotlin版本
  • 颤振清理-->D:\Development\颤振\first\U应用程序
  • 更新后重新创建项目
  • 日志文件
    2020-04-01 15:38:00597[96871]INFO-rationStore.ComponentStoreImpl-保存项目“D:\Development\flutter\first\u app”first\u appkotlin2JVM编译器参数耗时11毫秒
    2020-04-01 15:38:43068[139342]信息-.flatter.run.daemon.flatterapp-RunApp first_应用程序(运行)
    2020-04-01 15:38:43068[139342]信息-.flatter.run.daemon.flatterapp-D:\Programs\flatter\bin\flatter.bat[--no color,run,--machine,--track小部件创建,--device id=emulator-5554,lib\main.dart]
    2020-04-01 15:38:58491[154765]信息-.ApprappDaeMoneventListener-应用程序关闭时间超过100毫秒
    2020-04-01 15:38:58516[154790]信息-.flatter.run.daemon.flatterapp-stoppfirst\u应用程序(运行)
    2020-04-01 15:38:58958[155232]信息-pl.ProjectRootManager组件-项目根已更改
    2020-04-01 15:38:59037[155311]INFO-.diagnostic.PerformanceWatcher-推送属性花费了2毫秒;一般反应:正常;EDT响应:正常
    2020-04-01 15:38:59073[155347]INFO-.diagnostic.PerformanceWatcher-可索引文件迭代耗时36毫秒;一般反应:正常;EDT响应:正常
    2020-04-01 15:38:59073[155347]信息-index.UnindexedFilesUpdater-未索引文件更新已开始:要更新的3个文件
    2020-04-01 15:38:59112[155386]信息-.diagnostic.PerformanceWatcher-未索引文件更新耗时39毫秒;一般反应:正常;EDT响应:正常
    2020-04-01 15:39:48894[205168]警告-n.process.BaseOSProcessHandler-进程很长时间没有生成任何输出。
    如果它是一个长时间运行的大多数空闲守护进程,那么考虑用“BaseOutPrdReult.FordMistelSalePealType())覆盖OsPraceSeSundLeer-Read选项,以减少CPU使用率。
    命令行:D:\Programs\Android\emulator\emulator.exe-netdelay none-netspeed full-avd Pixel\u 2\u API\u 29
    java.lang.Throwable:进程创建:
    位于com.intellij.execution.process.BaseoProcessHandler。(BaseoProcessHandler.java:33)
    位于com.android.tools.idea.avdmanager.EmulatorProcessHandler.(EmulatorProcessHandler.java:45)
    位于com.android.tools.idea.avdmanager.EmulatorRunner.start(EmulatorRunner.java:57)
    在com.android.tools.idea.avdmanager.AvdManagerConnection.startAvd(AvdManagerConnection.java:419)
    位于com.android.tools.idea.avdmanager.AvdManagerConnection.startAvd(AvdManagerConnection.java:358)
    位于com.android.tools.idea.avdmanager.RunAvdAction.actionPerformed(RunAvdAction.java:36)
    在com.android.tools.idea.avdmanager.AvdUiAction.hyperlinkUpdate(AvdUiAction.java:127)上
    位于com.intellij.ui.HyperlinkLabel.firehperlinkevent(HyperlinkLabel.java:218)
    在com.intellij.ui.HyperlinkLabel.processMouseEvent(HyperlinkLabel.java:141)上
    位于java.awt.Component.processEvent(Component.java:6315)
    位于java.awt.Container.processEvent(Container.java:2239)
    位于java.awt.Component.dispatchEventImpl(Component.java:4899)
    位于java.awt.Container.dispatchEventImpl(Container.java:2297)
    位于java.awt.Component.dispatchEvent(Component.java:4721)
    位于java.awt.LightweightDispatcher.RetargetMouseeEvent(Container.java:4904)
    位于java.awt.LightweightDispatcher.ProcessMouseeEvent(Container.java:4532)
    位于java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
    位于java.awt.Container.dispatchEventImpl(Container.java:2283)
    位于java.awt.Window.dispatchEventImpl(Window.java:2746)
    位于java.awt.Component.dispatchEvent(Component.java:4721)
    位于java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
    在java.awt.EventQueue.access$500(EventQueue.java:98)
    在java.awt.EventQueue$3.run(EventQueue.java:715)
    在java.awt.EventQueue$3.run(EventQueue.java:709)
    位于java.security.AccessController.doPrivileged(本机方法)
    位于java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    位于java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
    在java.awt.EventQueue$4.run(EventQueue.java:739)
    在java.awt.EventQueue$4.run(EventQueue.java:737)
    位于java.security.AccessController.doPrivileged(本机方法)
    位于java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
    位于java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
    位于com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:878)
    在com.intellij.ide.IdeEventQueue.\u dispatchEvent(IdeEventQueue.java:823)
    位于com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:466)
    位于com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
    位于com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:465)
    位于java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
    在java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)中
    位于java.awt.EventDispatchThread.PumpeEventsforHierarchy(EventDispatchThread.java:105)
    位于java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
    位于java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
    在java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    2020-04-01 15:58:25798[1322072]警告-j.openapi.wm.impl.IdeFrameImpl-将TODO工具窗口中“项目”内容中的preferredFocusableComponent设置为
    
    def localProperties = new Properties()
    def localPropertiesFile = rootProject.file('local.properties')
    if (localPropertiesFile.exists()) {
        localPropertiesFile.withReader('UTF-8') { reader ->
            localProperties.load(reader)
        }
    }
    
    def flutterRoot = localProperties.getProperty('flutter.sdk')
    if (flutterRoot == null) {
        throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
    }
    
    def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
    if (flutterVersionCode == null) {
        flutterVersionCode = '1'
    }
    
    def flutterVersionName = localProperties.getProperty('flutter.versionName')
    if (flutterVersionName == null) {
        flutterVersionName = '1.0'
    }
    
    apply plugin: 'com.android.application'
    apply plugin: 'kotlin-android'
    apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
    
    android {
        compileSdkVersion 29
    
        sourceSets {
            main.java.srcDirs += 'src/main/kotlin'
        }
    
        lintOptions {
            disable 'InvalidPackage'
        }
    
        defaultConfig {
            // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
            applicationId "com.example.first_app"
            minSdkVersion 16
            targetSdkVersion 29
            versionCode flutterVersionCode.toInteger()
            versionName flutterVersionName
            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        }
    
        buildTypes {
            release {
                // TODO: Add your own signing config for the release build.
                // Signing with the debug keys for now, so `flutter run --release` works.
                signingConfig signingConfigs.debug
            }
        }
    }
    
    flutter {
        source '../..'
    }
    
    dependencies {
        implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'androidx.test:runner:1.2.0'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
    }
    
    #Fri Jun 23 08:50:38 CEST 2017
    distributionBase=GRADLE_USER_HOME
    distributionPath=wrapper/dists
    zipStoreBase=GRADLE_USER_HOME
    zipStorePath=wrapper/dists
    distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip
    
        2020-04-01 15:38:00,597 [  96871]   INFO - rationStore.ComponentStoreImpl - Saving Project 'D:\Development\flutter\first_app' first_appKotlin2JvmCompilerArguments took 11 ms 
    2020-04-01 15:38:43,068 [ 139342]   INFO - .flutter.run.daemon.FlutterApp - RunApp first_app (Run) 
    2020-04-01 15:38:43,068 [ 139342]   INFO - .flutter.run.daemon.FlutterApp - D:\Programs\flutter\bin\flutter.bat [--no-color, run, --machine, --track-widget-creation, --device-id=emulator-5554, lib\main.dart] 
    2020-04-01 15:38:58,491 [ 154765]   INFO - .FlutterAppDaemonEventListener - app shutdown took longer than 100ms 
    2020-04-01 15:38:58,516 [ 154790]   INFO - .flutter.run.daemon.FlutterApp - StopApp first_app (Run) 
    2020-04-01 15:38:58,958 [ 155232]   INFO - pl.ProjectRootManagerComponent - project roots have changed 
    2020-04-01 15:38:59,037 [ 155311]   INFO - .diagnostic.PerformanceWatcher - Pushing properties took 2ms; general responsiveness: ok; EDT responsiveness: ok 
    2020-04-01 15:38:59,073 [ 155347]   INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 36ms; general responsiveness: ok; EDT responsiveness: ok 
    2020-04-01 15:38:59,073 [ 155347]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update started: 3 files to update 
    2020-04-01 15:38:59,112 [ 155386]   INFO - .diagnostic.PerformanceWatcher - Unindexed files update took 39ms; general responsiveness: ok; EDT responsiveness: ok 
    2020-04-01 15:39:48,894 [ 205168]   WARN - n.process.BaseOSProcessHandler - Process hasn't generated any output for a long time.
    If it's a long-running mostly idle daemon process, consider overriding OSProcessHandler#readerOptions with 'BaseOutputReader.Options.forMostlySilentProcess()' to reduce CPU usage.
    Command line: D:\Programs\Android\emulator\emulator.exe -netdelay none -netspeed full -avd Pixel_2_API_29 
    java.lang.Throwable: Process creation:
        at com.intellij.execution.process.BaseOSProcessHandler.<init>(BaseOSProcessHandler.java:33)
        at com.android.tools.idea.avdmanager.EmulatorProcessHandler.<init>(EmulatorProcessHandler.java:45)
        at com.android.tools.idea.avdmanager.EmulatorRunner.start(EmulatorRunner.java:57)
        at com.android.tools.idea.avdmanager.AvdManagerConnection.startAvd(AvdManagerConnection.java:419)
        at com.android.tools.idea.avdmanager.AvdManagerConnection.startAvd(AvdManagerConnection.java:358)
        at com.android.tools.idea.avdmanager.RunAvdAction.actionPerformed(RunAvdAction.java:36)
        at com.android.tools.idea.avdmanager.AvdUiAction.hyperlinkUpdate(AvdUiAction.java:127)
        at com.intellij.ui.HyperlinkLabel.fireHyperlinkEvent(HyperlinkLabel.java:218)
        at com.intellij.ui.HyperlinkLabel.processMouseEvent(HyperlinkLabel.java:141)
        at java.awt.Component.processEvent(Component.java:6315)
        at java.awt.Container.processEvent(Container.java:2239)
        at java.awt.Component.dispatchEventImpl(Component.java:4899)
        at java.awt.Container.dispatchEventImpl(Container.java:2297)
        at java.awt.Component.dispatchEvent(Component.java:4721)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4904)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4532)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4476)
        at java.awt.Container.dispatchEventImpl(Container.java:2283)
        at java.awt.Window.dispatchEventImpl(Window.java:2746)
        at java.awt.Component.dispatchEvent(Component.java:4721)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:766)
        at java.awt.EventQueue.access$500(EventQueue.java:98)
        at java.awt.EventQueue$3.run(EventQueue.java:715)
        at java.awt.EventQueue$3.run(EventQueue.java:709)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:84)
        at java.awt.EventQueue$4.run(EventQueue.java:739)
        at java.awt.EventQueue$4.run(EventQueue.java:737)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:736)
        at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.java:878)
        at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.java:823)
        at com.intellij.ide.IdeEventQueue.lambda$dispatchEvent$8(IdeEventQueue.java:466)
        at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:704)
        at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.java:465)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)
    2020-04-01 15:58:25,798 [1322072]   WARN - j.openapi.wm.impl.IdeFrameImpl - Set preferredFocusableComponent in 'Project' content in TODO tool window to avoid focus-related problems. 
    2020-04-01 15:58:25,799 [1322073]   WARN - j.openapi.wm.impl.IdeFrameImpl - Project tool window - parent container is hidden 
    2020-04-01 15:58:45,410 [1341684]   WARN - j.openapi.wm.impl.IdeFrameImpl - Set preferredFocusableComponent in '' content in Dart Analysis tool window to avoid focus-related problems. 
    2020-04-01 15:58:45,410 [1341684]   WARN - j.openapi.wm.impl.IdeFrameImpl -  tool window - parent container is hidden 
    2020-04-01 15:58:47,751 [1344025]   WARN - j.openapi.wm.impl.IdeFrameImpl - Set preferredFocusableComponent in '' content in Logcat tool window to avoid focus-related problems. 
    2020-04-01 15:58:47,751 [1344025]   WARN - j.openapi.wm.impl.IdeFrameImpl -  tool window - parent container is hidden 
    2020-04-01 15:58:47,837 [1344111]   INFO - AndroidLogcatToolWindowFactory - Successfully obtained debug bridge 
    2020-04-01 15:58:59,615 [1355889]   INFO - m.pty4j.windows.WindowsVersion - Windows version: 10.0.18362 
    2020-04-01 15:59:04,985 [1361259]   WARN - j.openapi.wm.impl.IdeFrameImpl - Set preferredFocusableComponent in 'Project' content in TODO tool window to avoid focus-related problems. 
    2020-04-01 15:59:04,986 [1361260]   WARN - j.openapi.wm.impl.IdeFrameImpl - Project tool window - parent container is hidden 
    2020-04-01 15:59:05,402 [1361676]   WARN - j.openapi.wm.impl.IdeFrameImpl - Set preferredFocusableComponent in 'main.dart' content in Run tool window to avoid focus-related problems. 
    2020-04-01 15:59:05,402 [1361676]   WARN - j.openapi.wm.impl.IdeFrameImpl - main.dart tool window - parent container is hidden 
    2020-04-01 15:59:12,685 [1368959]   WARN - com.intellij.util.xmlb.Binding - no accessors for class org.jetbrains.kotlin.idea.scripting.gradle.GradleScriptInputsWatcher$Storage 
    2020-04-01 15:59:12,693 [1368967]   WARN - com.intellij.util.xmlb.Binding - no accessors for class org.jetbrains.kotlin.idea.core.script.configuration.utils.ScriptClassRootsStorage 
    2020-04-01 15:59:13,373 [1369647]   INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 734 ms 
    2020-04-01 16:00:37,197 [1453471]   INFO - .flutter.run.daemon.FlutterApp - RunApp first_app (Run) 
    2020-04-01 16:00:37,197 [1453471]   INFO - .flutter.run.daemon.FlutterApp - D:\Programs\flutter\bin\flutter.bat [--no-color, run, --machine, --track-widget-creation, --device-id=emulator-5554, lib\main.dart] 
    2020-04-01 16:00:43,092 [1459366]   INFO - .FlutterAppDaemonEventListener - app shutdown took longer than 100ms 
    2020-04-01 16:00:43,121 [1459395]   INFO - .flutter.run.daemon.FlutterApp - StopApp first_app (Run) 
    
    lintOptions {
        // disable 'InvalidPackage'
    }