{"id":64230,"date":"2026-01-23T05:16:43","date_gmt":"2026-01-22T21:16:43","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/64230.html"},"modified":"2026-01-23T05:16:43","modified_gmt":"2026-01-22T21:16:43","slug":"flutter-android%e4%b8%8d%e8%83%bd%e9%80%9a%e8%bf%87apply-script%e6%96%b9%e6%b3%95%e5%ba%94%e7%94%a8gradle%e6%8f%92%e4%bb%b6","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/64230.html","title":{"rendered":"Flutter-Android\u4e0d\u80fd\u901a\u8fc7apply script\u65b9\u6cd5\u5e94\u7528Gradle\u63d2\u4ef6"},"content":{"rendered":"<h3 id=\"FlutterAndroid\u4e0d\u80fd\u901a\u8fc7applyscript\u65b9\u6cd5\u5e94\u7528Gradle\u63d2\u4ef6-\u524d\u8a00\">\u524d\u8a00<\/h3>\n<p>\u6211\u73b0\u5728\u5c06Flutter\u4ece3.24.4\u5347\u7ea7\u52303.38.3\u540e&#xff0c;\u8fd0\u884c\u4ee5\u524d\u7684\u5b89\u88c5\u9879\u76ee\u51fa\u73b0\u4e0b\u9762\u7684\u9519\u8bef<\/p>\n<p>FAILURE: Build failed with an exception.<\/p>\n<p>* Where:<br \/>\nScript &#039;\/Users\/macbook\/development\/flutter\/packages\/flutter_tools\/gradle\/app_plugin_loader.gradle&#039; line: 9<\/p>\n<p>* What went wrong:<br \/>\nA problem occurred evaluating script.<br \/>\n&gt; You are applying Flutter&#039;s app_plugin_loader Gradle plugin imperatively using the apply script method, which is not possible anymore. Migrate to applying Gradle plugins with the declarative plugins block: https:\/\/flutter.dev\/to\/flutter-gradle-plugin-apply<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"292\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122211642-697293ba6bf5a.png\" width=\"1456\" \/><\/p>\n<h3 id=\"FlutterAndroid\u4e0d\u80fd\u901a\u8fc7applyscript\u65b9\u6cd5\u5e94\u7528Gradle\u63d2\u4ef6-\u95ee\u9898\u539f\u56e0\">\u95ee\u9898\u539f\u56e0<\/h3>\n<p>\u65b0\u7248\u7684Flutter\u5fc5\u987b\u5c06\u58f0\u660e\u5f0f \u8fc1\u79fb\u6210\u00a0\u63d2\u4ef6\u5f0f&#xff0c;\u5b98\u7f51\u53c2\u8003\u6837\u5f0f&#xff1a;https:\/\/docs.flutter.dev\/release\/breaking-changes\/flutter-gradle-plugin-apply#summary<\/p>\n<h3 id=\"FlutterAndroid\u4e0d\u80fd\u901a\u8fc7applyscript\u65b9\u6cd5\u5e94\u7528Gradle\u63d2\u4ef6-\u89e3\u51b3\u65b9\u5f0f\">\u89e3\u51b3\u65b9\u5f0f<\/h3>\n<p>1.\u8fdb\u5165\u5230android\/build.gradle\u6587\u4ef6\u4e2d&#xff0c;\u627e\u5230com.android.tools.build:gradle\u548cext.kotlin_version\u7684\u7248\u672c\u53f7&#xff0c;\u4ee5\u4e0b\u9762\u7684\u4ee3\u7801\u4e3a\u4f8b&#xff1a;<\/p>\n<p>buildscript {<br \/>\n    \/\/ ext.kotlin_version &#061; &#039;1.7.10&#039;<br \/>\n    ext.kotlin_version &#061; &#039;1.9.0&#039;<\/p>\n<p>    repositories {<br \/>\n        google()<br \/>\n        mavenCentral()<br \/>\n    }<\/p>\n<p>    dependencies {<br \/>\n        \/\/ START: FlutterFire Configuration<br \/>\n        classpath &#039;com.google.gms:google-services:4.3.15&#039;<br \/>\n        \/\/ END: FlutterFire Configuration<br \/>\n        \/\/ classpath &#039;com.android.tools.build:gradle:7.2.0&#039;<br \/>\n        classpath &#034;org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version&#034;<\/p>\n<p>        \/\/\u8fd9\u662f\u901a\u77e5\u6dfb\u52a0<br \/>\n        \/\/ classpath &#039;com.android.tools.build:gradle:7.3.1&#039;<br \/>\n        \/\/  classpath &#034;com.android.tools.build:gradle:8.1.0&#034;<br \/>\n        classpath &#039;com.android.tools.build:gradle:8.3.1&#039;<\/p>\n<p>    }<br \/>\n}<\/p>\n<p>allprojects {<br \/>\n    repositories {<br \/>\n        google()<br \/>\n        mavenCentral()<br \/>\n    }<br \/>\n}<\/p>\n<p>rootProject.buildDir &#061; &#039;..\/build&#039;<br \/>\nsubprojects {<br \/>\n    project.buildDir &#061; &#034;${rootProject.buildDir}\/${project.name}&#034;<br \/>\n}<br \/>\nsubprojects {<br \/>\n    project.evaluationDependsOn(&#039;:app&#039;)<br \/>\n}<\/p>\n<p>tasks.register(&#034;clean&#034;, Delete) {<br \/>\n    delete rootProject.buildDir<br \/>\n} <\/p>\n<p>\u6211\u4eec\u80fd\u591f\u5f97\u5230<\/p>\n<ul>\n<li>\n<p>ext.kotlin_version\u7684\u7248\u672c\u662f1.9.0<\/p>\n<\/li>\n<li>\n<p>com.android.tools.build:gradle\u7684\u7248\u672c\u662f8.3.1<\/p>\n<\/li>\n<\/ul>\n<p>2.\u4fee\u6539android\/build.gradle\u4e3a\u4e0b\u9762\u5185\u5bb9&#xff0c;\u5e76\u66ff\u6362<\/p>\n<p>{com.android.tools.build:gradle\u7248\u672c}\u548c{ext.kotlin_version\u7248\u672c}\u4e3a\u4e0a\u4e00\u6b65\u6211\u4eec\u5f97\u5230\u7684\u7248\u672c\u53f7<\/p>\n<p>pluginManagement {<br \/>\n    def flutterSdkPath &#061; {<br \/>\n        def properties &#061; new Properties()<br \/>\n        file(&#034;local.properties&#034;).withInputStream { properties.load(it) }<br \/>\n        def flutterSdkPath &#061; properties.getProperty(&#034;flutter.sdk&#034;)<br \/>\n        assert flutterSdkPath !&#061; null, &#034;flutter.sdk not set in local.properties&#034;<br \/>\n        return flutterSdkPath<br \/>\n    }()<\/p>\n<p>    includeBuild(&#034;$flutterSdkPath\/packages\/flutter_tools\/gradle&#034;)<\/p>\n<p>    repositories {<br \/>\n        google()<br \/>\n        mavenCentral()<br \/>\n        gradlePluginPortal()<br \/>\n    }<br \/>\n}<\/p>\n<p>plugins {<br \/>\n    id &#034;dev.flutter.flutter-plugin-loader&#034; version &#034;1.0.0&#034; \/\/ apply true<br \/>\n    id &#034;com.android.application&#034; version &#034;{com.android.tools.build:gradle\u7248\u672c}&#034; apply false<br \/>\n    id &#034;org.jetbrains.kotlin.android&#034; version &#034;{ext.kotlin_version\u7248\u672c}&#034; apply false<br \/>\n}<\/p>\n<p>include &#034;:app&#034; <\/p>\n<p>\u6211\u4eec\u53ef\u4ee5\u770b\u5230plugins\u4e2d\u7684\u5185\u5bb9\u5176\u5b9e\u662f\u548c\u7b2c\u4e00\u6b65\u4e2d\u7684dependencies\u76f8\u5bf9\u5e94\u7684\u3002\u4f46\u662f\u7b2c\u4e00\u6b65\u4e2d\u8fd8\u6709classpath &#039;com.google.gms:google-services:4.3.15&#039;\u8fd9\u4e2aGoogle\u670d\u52a1<\/p>\n<p>\u8fd9\u91cc\u6211\u4eec\u5c31\u8981\u5728<\/p>\n<p>pluginManagement\u2192plugins\u4e2d\u6dfb\u52a0\u5bf9\u5e94\u7684Google\u670d\u52a1<\/p>\n<p>\u5168\u90e8\u4ee3\u7801\u4e3a<\/p>\n<p>\/\/ \u7ba1\u7406 Android\/Kotlin\/Google Services \u63d2\u4ef6\u6765\u6e90&#xff08;\u66ff\u4ee3\u65e7\u7684 buildscript&#xff09;<br \/>\npluginManagement {<br \/>\n    def flutterSdkPath &#061; {<br \/>\n        def properties &#061; new Properties()<br \/>\n        file(&#034;local.properties&#034;).withInputStream { properties.load(it) }<br \/>\n        def flutterSdkPath &#061; properties.getProperty(&#034;flutter.sdk&#034;)<br \/>\n        assert flutterSdkPath !&#061; null, &#034;flutter.sdk not set in local.properties&#034;<br \/>\n        return flutterSdkPath<br \/>\n    }()<\/p>\n<p>    includeBuild(&#034;$flutterSdkPath\/packages\/flutter_tools\/gradle&#034;)<\/p>\n<p>    repositories {<br \/>\n        google()<br \/>\n        mavenCentral()<br \/>\n        gradlePluginPortal()<br \/>\n    }<br \/>\n    plugins {<\/p>\n<p>        \/\/ Google Services Plugin&#xff08;\u66ff\u4ee3\u65e7\u7684 classpath &#039;com.google.gms:google-services&#039;&#xff09;<br \/>\n        id(&#034;com.google.gms.google-services&#034;) version &#034;4.3.15&#034;<\/p>\n<p>    }<\/p>\n<p>}<br \/>\nplugins {<br \/>\n          \/\/ Flutter \u63d2\u4ef6\u52a0\u8f7d\u5668&#xff08;\u5fc5\u987b&#xff09;<br \/>\n        id(&#034;dev.flutter.flutter-plugin-loader&#034;) version &#034;1.0.0&#034; \/\/ apply true<br \/>\n        \/\/ Android Gradle Plugin&#xff08;Flutter \u63a8\u8350\u7684\u7ba1\u7406\u65b9\u5f0f&#xff09;<br \/>\n        id(&#034;com.android.application&#034;) version &#034;8.3.1&#034; apply false<\/p>\n<p>        \/\/ Kotlin Gradle Plugin&#xff08;\u66ff\u4ee3\u65e7\u7684 classpath \u5199\u6cd5&#xff09;<br \/>\n        id(&#034;org.jetbrains.kotlin.android&#034;) version &#034;1.9.0&#034; apply false<\/p>\n<p>    }<\/p>\n<p>include &#034;:app&#034; <\/p>\n<p>3.\u4fee\u6539android\/build.gradle&#xff0c;\u5220\u9664\u4e0b\u9762\u7684\u5185\u5bb9<\/p>\n<p>buildscript {<br \/>\n    ext.kotlin_version &#061; &#039;{kotlinVersion}&#039;<br \/>\n    repositories {<br \/>\n        google()<br \/>\n        mavenCentral()<br \/>\n    }<\/p>\n<p>    dependencies {<br \/>\n        classpath &#034;org.jetbrains.kotlin:gradle-plugin:$kotlin_version&#034;<br \/>\n    }<br \/>\n} <\/p>\n<p>\u6700\u7ec8\u7684\u4ee3\u7801\u4e3a<\/p>\n<p>allprojects {<br \/>\n    repositories {<br \/>\n        google()<br \/>\n        mavenCentral()<br \/>\n    }<br \/>\n}<\/p>\n<p>rootProject.buildDir &#061; &#039;..\/build&#039;<br \/>\nsubprojects {<br \/>\n    project.buildDir &#061; &#034;${rootProject.buildDir}\/${project.name}&#034;<br \/>\n}<br \/>\nsubprojects {<br \/>\n    project.evaluationDependsOn(&#039;:app&#039;)<br \/>\n}<\/p>\n<p>tasks.register(&#034;clean&#034;, Delete) {<br \/>\n    delete rootProject.buildDir<br \/>\n} <\/p>\n<p>4.\u4fee\u6539android\/app\/build.gradle\u6587\u4ef6<\/p>\n<p>\u9996\u5148\u5220\u9664\u4e0b\u9762\u5185\u5bb9<\/p>\n<p>def flutterRoot &#061; localProperties.getProperty(&#039;flutter.sdk&#039;)<br \/>\nif (flutterRoot &#061;&#061; null) {<br \/>\n    throw new GradleException(&#034;Flutter SDK not found. Define location with flutter.sdk in the local.properties file.&#034;)<br \/>\n} <\/p>\n<p>\u7136\u540e\u6ce8\u91ca\u4e0b\u9762\u7684apply&#xff0c;\u5982\u679c\u8fd8\u989d\u5916\u5f15\u5165\u8fc7\u5176\u4ed6apply\u4e5f\u4e00\u5e76\u6ce8\u91ca&#xff0c;<\/p>\n<p>\/\/ apply plugin: &#039;com.android.application&#039;<br \/>\n\/\/ apply plugin: &#039;kotlin-android&#039;<br \/>\n\/\/ apply from: &#034;$flutterRoot\/packages\/flutter_tools\/gradle\/flutter.gradle&#034;<\/p>\n<p>\/\/ apply plugin: &#039;com.google.gms.google-services&#039; <\/p>\n<p>\u5728\u9876\u90e8\u63d2\u5165\u5982\u4e0b\u5185\u5bb9&#xff1a;<\/p>\n<p>plugins {<br \/>\n    id &#034;com.android.application&#034;<br \/>\n    id &#034;kotlin-android&#034;<br \/>\n    id &#034;dev.flutter.flutter-gradle-plugin&#034;<br \/>\n    \/\/ \u5176\u4ed6\u989d\u5916\u4f9d\u8d56<br \/>\n    id &#034;com.google.gms.google-services&#034;<br \/>\n} <\/p>\n<p>\u5b8c\u6574\u4ee3\u7801\u4e3a<\/p>\n<p>\/\/ &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\n\/\/ \u2757\u2757 \u65b0\u89c4\u8303&#xff1a;\u4f7f\u7528 declarative plugins {}&#xff0c;\u66ff\u4ee3 apply plugin<br \/>\n\/\/ &#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;&#061;<br \/>\nplugins {<br \/>\n    id &#034;com.android.application&#034;                     \/\/ \u539f apply plugin: &#039;com.android.application&#039;<br \/>\n    id &#034;org.jetbrains.kotlin.android&#034;          \/\/ \u26a0 \u8fd9\u91cc\u4e0d\u5199 version&#xff0c;\u4f7f\u7528 settings.gradle \u4e2d\u7684\u7248\u672c<br \/>\n    \/\/ id &#034;kotlin-android&#034;<br \/>\n    id &#034;com.google.gms.google-services&#034;              \/\/ \u539f apply plugin: &#039;com.google.gms.google-services&#039;<br \/>\n    id &#034;dev.flutter.flutter-gradle-plugin&#034; \/\/ &#x1f680; Flutter 3.38.3 \u652f\u6301<br \/>\n}<\/p>\n<p>def localProperties &#061; new Properties()<br \/>\ndef localPropertiesFile &#061; rootProject.file(&#039;local.properties&#039;)<br \/>\nif (localPropertiesFile.exists()) {<br \/>\n    localPropertiesFile.withReader(&#039;UTF-8&#039;) { reader -&gt;<br \/>\n        localProperties.load(reader)<br \/>\n    }<br \/>\n}<\/p>\n<p>\/\/ def flutterRoot &#061; localProperties.getProperty(&#039;flutter.sdk&#039;)<br \/>\n\/\/ if (flutterRoot &#061;&#061; null) {<br \/>\n\/\/     throw new GradleException(&#034;Flutter SDK not found. Define location with flutter.sdk in the local.properties file.&#034;)<br \/>\n\/\/ }<\/p>\n<p>def flutterVersionCode &#061; localProperties.getProperty(&#039;flutter.versionCode&#039;)<br \/>\nif (flutterVersionCode &#061;&#061; null) {<br \/>\n    flutterVersionCode &#061; &#039;1&#039;<br \/>\n}<\/p>\n<p>def flutterVersionName &#061; localProperties.getProperty(&#039;flutter.versionName&#039;)<br \/>\nif (flutterVersionName &#061;&#061; null) {<br \/>\n    flutterVersionName &#061; &#039;1.0&#039;<br \/>\n}<\/p>\n<p>\/\/ \u26a0\ufe0f \u65e7\u5199\u6cd5&#xff08;\u5fc5\u987b\u5220\u9664&#xff0c;\u5426\u5219\u62a5\u9519&#xff09;<br \/>\n\/\/ apply plugin: &#039;com.android.application&#039;<br \/>\n\/\/ \/\/ START: FlutterFire Configuration<br \/>\n\/\/ apply plugin: &#039;com.google.gms.google-services&#039;<br \/>\n\/\/ \/\/ END: FlutterFire Configuration<br \/>\n\/\/ apply plugin: &#039;kotlin-android&#039;<br \/>\n\/\/ apply from: &#034;$flutterRoot\/packages\/flutter_tools\/gradle\/flutter.gradle&#034;<\/p>\n<p>\/\/ \u914d\u7f6e\u7b7e\u540d<\/p>\n<p>def keystoreProperties &#061; new Properties()<br \/>\ndef keystorePropertiesFile &#061; rootProject.file(&#039;key.properties&#039;)<br \/>\nif (keystorePropertiesFile.exists()) {<br \/>\n    keystoreProperties.load(new FileInputStream(keystorePropertiesFile))<br \/>\n}<\/p>\n<p>android {<br \/>\n    namespace  &#034;com.homedots&#034;<\/p>\n<p>    \/\/ compileSdkVersion 33<br \/>\n    compileSdkVersion 36<br \/>\n    ndkVersion flutter.ndkVersion<\/p>\n<p>    compileOptions {<br \/>\n        sourceCompatibility JavaVersion.VERSION_1_8<br \/>\n        targetCompatibility JavaVersion.VERSION_1_8<\/p>\n<p>        \/\/ \u542f\u7528\u5bf9\u65b0\u8bed\u8a00API\u7684\u652f\u6301\u7684\u6807\u5fd7   \u8fd9\u662f\u901a\u77e5\u6dfb\u52a0<br \/>\n        coreLibraryDesugaringEnabled true<br \/>\n    }<\/p>\n<p>    kotlinOptions {<br \/>\n        jvmTarget &#061; &#039;1.8&#039;<br \/>\n    }<\/p>\n<p>    sourceSets {<br \/>\n        main.java.srcDirs &#043;&#061; &#039;src\/main\/kotlin&#039;<br \/>\n    }<\/p>\n<p>    defaultConfig {<br \/>\n        \/\/ TODO: Specify your own unique Application ID (https:\/\/developer.android.com\/studio\/build\/application-id.html).<br \/>\n        applicationId &#034;com.homedots&#034;<br \/>\n        \/\/ You can update the following values to match your application needs.<br \/>\n        \/\/ For more information, see: https:\/\/docs.flutter.dev\/deployment\/android#reviewing-the-gradle-build-configuration.<br \/>\n        \/\/ minSdkVersion flutter.minSdkVersion<br \/>\n        minSdkVersion flutter.minSdkVersion<br \/>\n        \/\/ targetSdkVersion flutter.targetSdkVersion<br \/>\n        targetSdkVersion 35<\/p>\n<p>        versionCode flutterVersionCode.toInteger()<br \/>\n        versionName flutterVersionName<br \/>\n        \/\/\u8fd9\u662f\u901a\u77e5\u6dfb\u52a0<br \/>\n         multiDexEnabled true<br \/>\n    }<br \/>\n    signingConfigs {<br \/>\n       release {<br \/>\n           keyAlias keystoreProperties[&#039;keyAlias&#039;]<br \/>\n           keyPassword keystoreProperties[&#039;keyPassword&#039;]<br \/>\n           storeFile keystoreProperties[&#039;storeFile&#039;] ? file(keystoreProperties[&#039;storeFile&#039;]) : null<br \/>\n           storePassword keystoreProperties[&#039;storePassword&#039;]<br \/>\n       }<br \/>\n    }<\/p>\n<p>    buildTypes {<br \/>\n        release {<br \/>\n            \/\/ TODO: Add your own signing config for the release build.<br \/>\n            \/\/ Signing with the debug keys for now, so &#096;flutter run &#8211;release&#096; works.<br \/>\n             signingConfig signingConfigs.release<br \/>\n            \/\/ signingConfig signingConfigs.debug<br \/>\n            \/\/\u89e3\u51b3\u4e86flutter_blue_plus\u6253\u5305\u540e\u65e0\u6548\u7684\u95ee\u9898<br \/>\n            shrinkResources false<br \/>\n            minifyEnabled false<br \/>\n        }<br \/>\n    }<br \/>\n}<\/p>\n<p>flutter {<br \/>\n    source &#039;..\/..&#039;<br \/>\n}<\/p>\n<p>dependencies {<br \/>\n    \/\/ implementation &#034;org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version&#034;<br \/>\n     \/\/\u8fd9\u662f\u901a\u77e5\u6dfb\u52a0<br \/>\n     coreLibraryDesugaring &#039;com.android.tools:desugar_jdk_libs:1.2.2&#039;<br \/>\n     implementation &#039;androidx.window:window:1.0.0&#039;<br \/>\n     implementation &#039;androidx.window:window-java:1.0.0&#039;<\/p>\n<p>} <\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a00<br \/>\n\u6211\u73b0\u5728\u5c06Flutter\u4ece3.24.4\u5347\u7ea7\u52303.38.3\u540e&#xff0c;\u8fd0\u884c\u4ee5\u524d\u7684\u5b89\u88c5\u9879\u76ee\u51fa\u73b0\u4e0b\u9762\u7684\u9519\u8bef<br \/>\nFAILURE: Build failed with an exception.* Where:<br \/>\nScript \/Users\/macbook\/development\/flutter\/packages\/flutter_tools\/gradle\/app_plugin_loader.gradle line: 9* What went wrong:<br \/>\nA problem <\/p>\n","protected":false},"author":2,"featured_media":64229,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[84,2878],"topic":[],"class_list":["post-64230","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-android","tag-flutter"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Flutter-Android\u4e0d\u80fd\u901a\u8fc7apply script\u65b9\u6cd5\u5e94\u7528Gradle\u63d2\u4ef6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/64230.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Flutter-Android\u4e0d\u80fd\u901a\u8fc7apply script\u65b9\u6cd5\u5e94\u7528Gradle\u63d2\u4ef6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u524d\u8a00 \u6211\u73b0\u5728\u5c06Flutter\u4ece3.24.4\u5347\u7ea7\u52303.38.3\u540e&#xff0c;\u8fd0\u884c\u4ee5\u524d\u7684\u5b89\u88c5\u9879\u76ee\u51fa\u73b0\u4e0b\u9762\u7684\u9519\u8bef FAILURE: Build failed with an exception.* Where: Script \/Users\/macbook\/development\/flutter\/packages\/flutter_tools\/gradle\/app_plugin_loader.gradle line: 9* What went wrong: A problem\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/64230.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-01-22T21:16:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122211642-697293ba6bf5a.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/64230.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/64230.html\",\"name\":\"Flutter-Android\u4e0d\u80fd\u901a\u8fc7apply script\u65b9\u6cd5\u5e94\u7528Gradle\u63d2\u4ef6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-01-22T21:16:43+00:00\",\"dateModified\":\"2026-01-22T21:16:43+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/64230.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/64230.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/64230.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Flutter-Android\u4e0d\u80fd\u901a\u8fc7apply script\u65b9\u6cd5\u5e94\u7528Gradle\u63d2\u4ef6\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Flutter-Android\u4e0d\u80fd\u901a\u8fc7apply script\u65b9\u6cd5\u5e94\u7528Gradle\u63d2\u4ef6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/64230.html","og_locale":"zh_CN","og_type":"article","og_title":"Flutter-Android\u4e0d\u80fd\u901a\u8fc7apply script\u65b9\u6cd5\u5e94\u7528Gradle\u63d2\u4ef6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u524d\u8a00 \u6211\u73b0\u5728\u5c06Flutter\u4ece3.24.4\u5347\u7ea7\u52303.38.3\u540e&#xff0c;\u8fd0\u884c\u4ee5\u524d\u7684\u5b89\u88c5\u9879\u76ee\u51fa\u73b0\u4e0b\u9762\u7684\u9519\u8bef FAILURE: Build failed with an exception.* Where: Script \/Users\/macbook\/development\/flutter\/packages\/flutter_tools\/gradle\/app_plugin_loader.gradle line: 9* What went wrong: A problem","og_url":"https:\/\/www.wsisp.com\/helps\/64230.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-01-22T21:16:43+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/01\/20260122211642-697293ba6bf5a.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/64230.html","url":"https:\/\/www.wsisp.com\/helps\/64230.html","name":"Flutter-Android\u4e0d\u80fd\u901a\u8fc7apply script\u65b9\u6cd5\u5e94\u7528Gradle\u63d2\u4ef6 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-01-22T21:16:43+00:00","dateModified":"2026-01-22T21:16:43+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/64230.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/64230.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/64230.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"Flutter-Android\u4e0d\u80fd\u901a\u8fc7apply script\u65b9\u6cd5\u5e94\u7528Gradle\u63d2\u4ef6"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/64230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=64230"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/64230\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/64229"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=64230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=64230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=64230"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=64230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}