Android Studio版本升级后的问题 gradle降级、jdk升级

Cannot use @TaskAction annotation on method IncrementalTask.taskAction$gradle_core() because interface org.gradle.api.tasks.incremental.IncrementalTaskInputs is not a valid parameter to an action method.

复制代码
修改下面两处地方分别为7.0.3、7.3.3


Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.

java 复制代码
An exception occurred applying plugin request [id: 'com.android.application']
> Failed to apply plugin 'com.android.internal.application'.
   > Android Gradle plugin requires Java 11 to run. You are currently using Java 1.8.
     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`.

Can't determine type for tag '<macro name="m3_comp_switch_disabled_selected_handle_color">

AGPBI: {"kind":"error","text":"Can't determine type for tag '<macro name="m3_comp_switch_disabled_selected_handle_color">?attr/colorSurface'","sources":{"file":"/Users/fausto/.gradle/caches/transforms-3/4948d05d0ff6027d2e3c9f4a6010103b/transformed/material-1.7.0-alpha02/res/values/values.xml"},"tool":"Resource and asset merger"}

降级 androidx.appcompat:appcompat

降级 com.google.android.material:material

为以下版本

java 复制代码
    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'com.google.android.material:material:1.6.0'
相关推荐
andyweike8 分钟前
Android Automotive
android
又见情义33 分钟前
记一次 RK3568 Android 13 蓝牙反复重启问题的排查与修复
android
hai_android1 小时前
Kotlin Flow combine 源码剖析:一个 Channel 如何优雅合并多条流
android·java·kotlin
一木 之林1 小时前
Miniconda 安装与 Jupyter 使用入门
ide·python·jupyter
敲代码的瓦龙2 小时前
Jetpack?ViewModel!!!
android·开发语言·kotlin·android-studio
Godikov3 小时前
Android 工控终端实战:从秒级卡顿到毫秒响应,SQLite/LitePal 性能优化全记录
android
辰辉创聚5 小时前
禽流感病毒分子基础:表面抗原与内部转录复合体的功能解析
ide·leetcode·rabbitmq·重组血凝素蛋白·甲型流感病毒核蛋白·禽流感单抗
星间都市山脉5 小时前
Android16 SystemService.onBootPhase 调用时机
android·java·linux·windows·ubuntu
swithun5 小时前
不用 WebView,我用 Kotlin + Compose Multiplatform 重写 Mermaid,并做了 2048 组对拍
android·开源·kotlin
AI吃大瓜5 小时前
人脸检测和行人检测4:Android实现YOLOv8 YOLO11 YOLO26人脸检测和人体检测(含源码,可实时检测)
android·yolo·人脸检测·人体检测·行人检测·yolo26