国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Android Studio版本升級(jí)后的問題 gradle降級(jí)、jdk升級(jí) Compose 與 Kotlin 的兼容性對(duì)應(yīng)關(guān)系

這篇具有很好參考價(jià)值的文章主要介紹了Android Studio版本升級(jí)后的問題 gradle降級(jí)、jdk升級(jí) Compose 與 Kotlin 的兼容性對(duì)應(yīng)關(guān)系。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

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

cannot use @taskaction annotation on method incrementaltask.taskaction$gradl,android studio,android,ide
cannot use @taskaction annotation on method incrementaltask.taskaction$gradl,android studio,android,ide

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

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`.

cannot use @taskaction annotation on method incrementaltask.taskaction$gradl,android studio,android,ide

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”}

降級(jí) androidx.appcompat:appcompat
降級(jí) com.google.android.material:material
為以下版本

    implementation 'androidx.appcompat:appcompat:1.4.1'
    implementation 'com.google.android.material:material:1.6.0'

Unexpected tokens (use ‘;’

e: D:\work\HappyBirthday\settings.gradle.kts:3:21: Unexpected tokens (use ';' to separate expressions on the same line)

國內(nèi)鏡像如此配置

pluginManagement {
    repositories {
        maven { url = uri('https://maven.aliyun.com/repository/google') };
        maven { url = uri('https://maven.aliyun.com/repository/jcenter') };
        maven { url = uri('https://maven.aliyun.com/repository/gradle-plugin') }
    }
}
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        maven { url = uri('https://maven.aliyun.com/repository/google') };
        maven { url = uri('https://maven.aliyun.com/repository/jcenter') };
        maven { url = uri('https://maven.aliyun.com/repository/gradle-plugin') }
    }
}

org.jetbrains.kotlin.android 版本

plugins {
    id("com.android.application") version "7.0.3" apply false
    id("org.jetbrains.kotlin.android") version "1.5.31" apply false
}

cannot use @taskaction annotation on method incrementaltask.taskaction$gradl,android studio,android,ide

Compose 與 Kotlin 的兼容性對(duì)應(yīng)關(guān)系

cannot use @taskaction annotation on method incrementaltask.taskaction$gradl,android studio,android,ide

build.gradle.kts

注釋package。文章來源地址http://www.zghlxwxcb.cn/news/detail-765510.html

plugins {
    id("com.android.application")
    id("org.jetbrains.kotlin.android")
}

android {
    namespace = "cn.jj.happybirthday"
    compileSdk = 33

    defaultConfig {
        applicationId = "cn.jj.happybirthday"
        minSdk = 24
        targetSdk = 33
        versionCode = 1
        versionName = "1.0"

        testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
        vectorDrawables {
            useSupportLibrary = true
        }
    }

    buildTypes {
        release {
            isMinifyEnabled = false
            proguardFiles(
                getDefaultProguardFile("proguard-android-optimize.txt"),
                "proguard-rules.pro"
            )
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_1_8
        targetCompatibility = JavaVersion.VERSION_1_8
    }
    kotlinOptions {
        jvmTarget = "1.8"
    }
    buildFeatures {
        compose = true
    }
    composeOptions {
        kotlinCompilerExtensionVersion = "1.4.3"
    }
//    packaging {
//        resources {
//            excludes += "/META-INF/{AL2.0,LGPL2.1}"
//        }
//    }
}

dependencies {

    implementation("androidx.core:core-ktx:1.9.0")
    implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.1")
    implementation("androidx.activity:activity-compose:1.7.0")
    implementation(platform("androidx.compose:compose-bom:2023.03.00"))
    implementation("androidx.compose.ui:ui")
    implementation("androidx.compose.ui:ui-graphics")
    implementation("androidx.compose.ui:ui-tooling-preview")
    implementation("androidx.compose.material3:material3")
    testImplementation("junit:junit:4.13.2")
    androidTestImplementation("androidx.test.ext:junit:1.1.5")
    androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
    androidTestImplementation(platform("androidx.compose:compose-bom:2023.03.00"))
    androidTestImplementation("androidx.compose.ui:ui-test-junit4")
    debugImplementation("androidx.compose.ui:ui-tooling")
    debugImplementation("androidx.compose.ui:ui-test-manifest")
}

到了這里,關(guān)于Android Studio版本升級(jí)后的問題 gradle降級(jí)、jdk升級(jí) Compose 與 Kotlin 的兼容性對(duì)應(yīng)關(guān)系的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • 【Android Studio插件升級(jí)以后kotlin jdk版本沖突】

    【Android Studio插件升級(jí)以后kotlin jdk版本沖突】

    今天升級(jí)一些插件版本后無法編譯,發(fā)現(xiàn)kotlin jdk 1.8.20和kotlin jdk 1.6.21重復(fù)沖突,網(wǎng)上找了挺多方法都沒生效,千回百轉(zhuǎn)才解決,發(fā)出來希望可以幫助到同樣報(bào)錯(cuò)的同學(xué) FAILURE: Build failed with an exception. What went wrong: Execution failed for task ‘:app:checkDebugDuplicateClasses’. A failure occurred while

    2024年02月12日
    瀏覽(25)
  • 記錄Android Studio 升級(jí)Gradle7.5-8.5遇到的問題

    首先說明我升級(jí)到的是: Gradle 8.5 ,Android(AGP 8.2.2)、kotlin(1.9.22)相關(guān)插件升級(jí)這里就不做說明了 問題1:Gradle8.0+后需要使用JDK17,JavaVersion.VERSION_17 我的AS修改后需要重新打開項(xiàng)目,否則不起效果。 問題2 :namespace,所有模塊必須要有namespace 所有模塊添加namespace,同時(shí)會(huì)導(dǎo)致模塊

    2024年04月12日
    瀏覽(27)
  • 保姆式教程:MAC安裝Android studio(包括安裝JDK,Android SDK),解決gradle下載慢的問題

    保姆式教程:MAC安裝Android studio(包括安裝JDK,Android SDK),解決gradle下載慢的問題

    原文鏈接 原文鏈接 下載地址 下載后雙擊安裝包 打開Mac的終端,輸入命令查詢JDK的安裝路徑 配置環(huán)境之前需要清楚這個(gè)JDK的安裝路徑,如果知道就不用查 輸入以上字符串,就會(huì)輸出JDK的安裝路徑,將這個(gè)路徑復(fù)制暫且復(fù)制下來,一會(huì)兒用。 然后接下來我們?cè)诮K端輸入相應(yīng)的

    2024年02月04日
    瀏覽(95)
  • 【Flutter 問題系列第 78 篇】Android Studio 升級(jí)后提示 org.gradle.java.home Gradle property is invalid 的解決方案

    【Flutter 問題系列第 78 篇】Android Studio 升級(jí)后提示 org.gradle.java.home Gradle property is invalid 的解決方案

    這是【Flutter 問題系列第 78 篇】,如果覺得有用的話,歡迎關(guān)注專欄。 Flutter SDK:3.3.5,Dart SDK:2.18.2, 操作系統(tǒng):macOS Ventura 13.0.1 Intel Core i9,Android Studio 版本:Flamingo 2022.2.1 Patch 2 一:問題描述 在公司的 M2 電腦上,直接使用 Android Studio 的檢查更新,升級(jí)到 Flamingo 2022.2.1 版

    2024年02月05日
    瀏覽(26)
  • Android Gradle Plugin與Gradle版本、JDK版本對(duì)應(yīng)關(guān)系

    Android Gradle Plugin版本 Gradle版本 SDK Build Tools JDK版本 備注 8.2 8.1 17 8.1 8.0 17 8.0 8.0 30.0.3 17 7.4 7.5 30.0.3 11 7.3 7.4 30.0.3 11 7.2 7.3.3 30.0.3 11 7.1 7.2 30.0.3 11 7.0 7.0 30.0.2 11 4.2.0+ 6.7.1 30.0.2 8+ 4.1.0+ 6.5+ 29.0.2 8+ 4.0.0+ 6.1.1+ 29.0.2 8+ 3.6.0 - 3.6.4 5.6.4+ 28.0.3 8+ 3.5.0 - 3.5.4 5.4.1+ 28.0.3 8+ 3.4.0 - 3.4.3 5.1.1+ 28

    2024年02月08日
    瀏覽(22)
  • Flutter & Android問題記錄 - 升級(jí)Android Studio 2022.2.1版本后運(yùn)行項(xiàng)目報(bào)錯(cuò)

    Flutter & Android問題記錄 - 升級(jí)Android Studio 2022.2.1版本后運(yùn)行項(xiàng)目報(bào)錯(cuò)

    最近一個(gè)Flutter項(xiàng)目有新需求,開發(fā)時(shí)一直是在iOS設(shè)備上運(yùn)行,花了幾天做完后運(yùn)行到Android設(shè)備測試,結(jié)果項(xiàng)目構(gòu)建失敗了。 Flutter: 3.7.11 Android Studio: 2022.2.1 Java: 17.0.6 Gradle: 7.4 Android Gradle Plugin (AGP): 4.1.3 項(xiàng)目構(gòu)建報(bào)錯(cuò)日志: 報(bào)錯(cuò)有點(diǎn)眼熟,根據(jù)以往開發(fā)經(jīng)驗(yàn),應(yīng)該是Gradle版本

    2023年04月24日
    瀏覽(34)
  • Android開發(fā)中Gradle插件,Gradle版本與JDK版本之間的對(duì)應(yīng)關(guān)系

    Gradle插件 Gradle版本 SDK Build Tools JDK版本 說明 8.2 8.1 17 8.1 8.0 17 8.0 8.0 30.0.3 17 7.4 7.5 30.0.3 11 7.3 7.4 30.0.3 11 7.2 7.3.3 30.0.3 11 7.1 7.2 30.3.30 11 4.2.0+ 6.7.1 30.0.2 8+ 4.1.0+ 6.5+ 29.0.2 8+ 4.0.0+ 6.1.1+ 29.0.2 8+ 3.6.0~3.6.4 5.6.4+ 28.0.3 8+ 3.5.0 - 3.5.4 5.4.1+ 28.0.3 8+ 3.4.0 - 3.4.3 5.1.1+ 28.0.3 8+ 3.3.0 - 3.3.3 4.10.1+ 28.0

    2024年03月20日
    瀏覽(28)
  • Android Studio 升級(jí) Flamingo 后 Gradle 又掛了

    1.Gradle 7.2 才支持 Java 17 Unsupported Java. Your build is currently configured to use Java 17.0.6 and Gradle 5.0. Possible solution: ?- Upgrade Gradle wrapper to 7.2 version and re-import the project ? 2.Android plugin 7.1 才支持 Gradle 7.2 Unable to find method \\\'\\\'org.gradle.api.file.DirectoryProperty org.gradle.api.file.ProjectLayout.directoryProp

    2024年02月02日
    瀏覽(21)
  • Android Gradle Plugin、Gradle、Android Studio版本關(guān)系

    參考鏈接 插件版本 所需的最低 Gradle 版本 8.3 8.4 8.2 8.2 8.1 8.0 8.0 8.0 7.4 7.5 7.3 7.4 7.2 7.3.3 7.1 7.2 7.0 7.0 4.2.0+ 6.7.1 4.1.0+ 6.5+ 4.0.0+ 6.1.1+ 3.6.0 - 3.6.4 5.6.4+ 3.5.0 - 3.5.4 5.4.1+ 3.4.0 - 3.4.3 5.1.1+ 3.3.0 - 3.3.3 4.10.1+ 3.2.0 - 3.2.1 4.6+ 3.1.0+ 4.4+ 3.0.0+ 4.1+ 2.3.0+ 3.3+ 2.1.3 - 2.2.3 2.14.1 - 3.5 2.0.0 - 2.1.2 2.10 - 2.1

    2024年02月20日
    瀏覽(23)
  • Android Studio 修改 Gradle 版本

    Gradle 是一種強(qiáng)大的構(gòu)建工具,廣泛應(yīng)用于 Android 開發(fā)中。它可以幫助我們管理項(xiàng)目的依賴、編譯代碼并生成可執(zhí)行文件等等。在 Android Studio 中,Gradle 的版本是由項(xiàng)目的 build.gradle 文件指定的。本文將介紹如何修改 Android Studio 中的 Gradle 版本,并給出相應(yīng)的源代碼示例。 首先

    2024年02月02日
    瀏覽(30)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包