Flutter 第二篇

1、第一步

async: 2.4.0
audio_recorder: 1.0.2

2、点击右上角 更新

大部分红线没有了

卡在

3、运行在模拟器里面

Running Gradle task 'assembleDebug'...

报错一:

* Where: Build file '/Users/guoxingdeng/AndroidStudioProjects/fltteraistock/android/app/build.gradle' line: 2 * What went wrong: An exception occurred applying plugin request [id: 'com.android.application'] > Failed to apply plugin 'com.android.internal.application'. > Android Gradle plugin requires Java 17 to run. You are currently using Java 11. Your current JDK is located in /Applications/Android Studio.app/Contents/jre/Contents/Home You can try some of the following options: - changing the IDE settings. - changing the JAVA_HOME environment variable. - changing org.gradle.java.home in gradle.properties. * Try: > Run with --stacktrace option to get the stack trace.

解决方案:

  • 找到 android/gradle.properties 文件。
  • 添加以下内容,确保 Gradle 使用正确的 JDK 路径
org.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk-17.0.2.jdk/Contents/Home

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值