-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed as not planned
Labels
r: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issue
Description
Is there an existing issue for this?
- I have searched the existing issues
- I have read the guide to filing a bug
Steps to reproduce
1.android => app => build.gradle.kts
plugins {
id("com.android.application")
kotlin("android")
kotlin("kapt")
id("dev.flutter.flutter-gradle-plugin")
}
extensions.configure<FlutterExtension>("flutter") {
this.source = "../.."
println("flutter.source ${this.source}")
}
2.android => settings.gradle.kts
pluginManagement {
val agpVersion: String by settings
val kotlinVersion: String by settings
val kspVersion: String by settings
val flutterVersion: String by settings
var sdkPathExists = false
fun flutterSdkPath(): String? {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
assert(flutterSdkPath != null) {
"flutter.sdk not set in local.properties"
}
return flutterSdkPath
}
flutterSdkPath()?.apply {
sdkPathExists = true
settings.extra["flutterSdkPath"] = this
includeBuild("${this}/packages/flutter_tools/gradle")
}
resolutionStrategy {
eachPlugin {
if (requested.id.name == "flutter") {
useModule("dev.flutter:flutter-gradle-plugin:$flutterVersion")
}
}
}
plugins {
id("com.android.application") version (agpVersion) apply (false)
id("com.android.library") version (agpVersion) apply (false)
kotlin("gradle-plugin") version (kotlinVersion) apply (false)
kotlin("android") version (kotlinVersion) apply (false)
kotlin("kapt") version (kotlinVersion) apply (false)
kotlin("jvm") version (kotlinVersion) apply (false)
if (sdkPathExists) {
id("dev.flutter.flutter-gradle-plugin") version (flutterVersion) apply false
}
}
}
// Load and include Flutter plugins.
val flutterProjectRoot: Path = rootProject.projectDir.parentFile.toPath()
val pluginsFile: Path = flutterProjectRoot.resolve(".flutter-plugins-dependencies")
if (!Files.exists(pluginsFile)) {
throw GradleException("Flutter plugins file not found. Define plugins in $pluginsFile.")
}
@Suppress("UNCHECKED_CAST")
val map = JsonSlurper().parseText(
pluginsFile.toFile().readText()
) as? Map<String, Map<String, List<Map<String, Any>>>>
val android = (map?.get("plugins")?.get("android") ?: arrayListOf())
android.forEach {
val name = it["name"] as String
val path = it["path"] as String
val needsBuild: Boolean =
if (it.containsKey("native_build")) it["native_build"] as Boolean else true
if (!needsBuild) {
return@forEach
}
val pluginDirectory = file(path).toPath().resolve("android")
assert(pluginDirectory.exists())
include(":$name")
project(":$name").projectDir = pluginDirectory.toFile()
}
- run gradle
./gradlew build
Expected results
gradel should show "BUILD SUCCESSFUL in 1m" message
Actual results
gradle daemon process enters infinite loop,Until the memory is completely consumed and the system crashes
Code sample
Code sample
[code in Steps to reproduce]Screenshots or Video
Screenshots / Video demonstration
[Upload media here]
Logs
Logs
> Task :gradle:extractPluginRequests NO-SOURCE
> Task :gradle:generatePluginAdapters NO-SOURCE
> Task :gradle:compileJava NO-SOURCE
> Task :gradle:compileGroovy
> Task :gradle:compileGroovyPlugins NO-SOURCE
> Task :gradle:pluginDescriptors UP-TO-DATE
> Task :gradle:processResources UP-TO-DATE
> Task :gradle:classes
> Task :gradle:jar
> Configure project :app
Kotlin DSL property assignment is an incubating feature.
flutter.source ../..
--W- Build Environment: AGConnect plugin version is: 1.9.1.300, Gradle version is: 8.3, Android Plugin version is: 8.3.0-alpha03
--I- there's no config file
--W- The variant: debug, There's no json file
--I- there's no config file
--W- The variant: release, There's no json file
--I- there's no config file
--W- The variant: profile, There's no json file
> Configure project :
Starting a Gradle Daemon, 1 busy and 165 stopped Daemons could not be reused, use --status for details
> Task :gradle:extractPluginRequests NO-SOURCE
> Task :gradle:generatePluginAdapters NO-SOURCE
> Task :gradle:compileJava NO-SOURCE
> Task :gradle:compileGroovy
> Task :gradle:compileGroovyPlugins NO-SOURCE
> Task :gradle:pluginDescriptors UP-TO-DATE
> Task :gradle:processResources UP-TO-DATE
> Task :gradle:classes
> Task :gradle:jar
> Configure project :app
Kotlin DSL property assignment is an incubating feature.
flutter.source ../..
--W- Build Environment: AGConnect plugin version is: 1.9.1.300, Gradle version is: 8.3, Android Plugin version is: 8.3.0-alpha03
--I- there's no config file
--W- The variant: debug, There's no json file
--I- there's no config file
--W- The variant: release, There's no json file
--I- there's no config file
--W- The variant: profile, There's no json file
> Configure project :
Starting a Gradle Daemon, 2 busy and 165 stopped Daemons could not be reused, use --status for details
% ./gradlew build --status
No Gradle daemons are running.
PID STATUS INFO
64016 STOPPED (other compatible daemons were started and after being idle for 0 minutes and not recently used)
64209 STOPPED (other compatible daemons were started and after being idle for 0 minutes and not recently used)
64030 STOPPED (other compatible daemons were started and after being idle for 0 minutes and not recently used)
63933 STOPPED (by user or operating system)
63991 STOPPED (by user or operating system)
64353 STOPPED (by user or operating system)
64367 STOPPED (by user or operating system)
64381 STOPPED (by user or operating system)
64395 STOPPED (by user or operating system)
64409 STOPPED (by user or operating system)
64423 STOPPED (by user or operating system)
64442 STOPPED (by user or operating system)
64456 STOPPED (by user or operating system)
64470 STOPPED (by user or operating system)
64484 STOPPED (by user or operating system)
64500 STOPPED (by user or operating system)
64534 STOPPED (by user or operating system)
64549 STOPPED (by user or operating system)
64563 STOPPED (by user or operating system)
64583 STOPPED (by user or operating system)
64597 STOPPED (by user or operating system)
64616 STOPPED (by user or operating system)
64631 STOPPED (by user or operating system)
64647 STOPPED (by user or operating system)
64661 STOPPED (by user or operating system)
64679 STOPPED (by user or operating system)
64700 STOPPED (by user or operating system)
64716 STOPPED (by user or operating system)
64804 STOPPED (by user or operating system)
65005 STOPPED (by user or operating system)
65038 STOPPED (by user or operating system)
65052 STOPPED (by user or operating system)
65067 STOPPED (by user or operating system)
65075 STOPPED (by user or operating system)
65096 STOPPED (by user or operating system)
65115 STOPPED (by user or operating system)
65129 STOPPED (by user or operating system)
65143 STOPPED (by user or operating system)
65157 STOPPED (by user or operating system)
65174 STOPPED (by user or operating system)
65188 STOPPED (by user or operating system)
65202 STOPPED (by user or operating system)
65216 STOPPED (by user or operating system)
65241 STOPPED (by user or operating system)
65251 STOPPED (by user or operating system)
65274 STOPPED (by user or operating system)
65290 STOPPED (by user or operating system)
65307 STOPPED (by user or operating system)
65321 STOPPED (by user or operating system)
65335 STOPPED (by user or operating system)
65349 STOPPED (by user or operating system)
65363 STOPPED (by user or operating system)
65385 STOPPED (by user or operating system)
65399 STOPPED (by user or operating system)
65413 STOPPED (by user or operating system)
65428 STOPPED (by user or operating system)
65443 STOPPED (by user or operating system)
65464 STOPPED (by user or operating system)
65476 STOPPED (by user or operating system)
65505 STOPPED (by user or operating system)
65528 STOPPED (by user or operating system)
65542 STOPPED (by user or operating system)
65556 STOPPED (by user or operating system)
65570 STOPPED (by user or operating system)
65584 STOPPED (by user or operating system)
65598 STOPPED (by user or operating system)
66036 STOPPED (by user or operating system)
66052 STOPPED (by user or operating system)
66066 STOPPED (by user or operating system)
66082 STOPPED (by user or operating system)
66142 STOPPED (by user or operating system)
66158 STOPPED (by user or operating system)
66175 STOPPED (by user or operating system)
66194 STOPPED (by user or operating system)
66213 STOPPED (by user or operating system)
66227 STOPPED (by user or operating system)
66244 STOPPED (by user or operating system)
66289 STOPPED (by user or operating system)
66315 STOPPED (by user or operating system)
66329 STOPPED (by user or operating system)
66343 STOPPED (by user or operating system)
66357 STOPPED (by user or operating system)
66374 STOPPED (by user or operating system)
66396 STOPPED (by user or operating system)
66413 STOPPED (by user or operating system)
66433 STOPPED (by user or operating system)
66460 STOPPED (by user or operating system)
66461 STOPPED (by user or operating system)
66478 STOPPED (by user or operating system)
66492 STOPPED (by user or operating system)
66543 STOPPED (by user or operating system)
66544 STOPPED (by user or operating system)
66576 STOPPED (by user or operating system)
66584 STOPPED (by user or operating system)
66603 STOPPED (by user or operating system)
66617 STOPPED (by user or operating system)
66637 STOPPED (by user or operating system)
66653 STOPPED (by user or operating system)
66683 STOPPED (by user or operating system)
66697 STOPPED (by user or operating system)
66718 STOPPED (by user or operating system)
66733 STOPPED (by user or operating system)
66752 STOPPED (by user or operating system)
66767 STOPPED (by user or operating system)
66789 STOPPED (by user or operating system)
66803 STOPPED (by user or operating system)
66819 STOPPED (by user or operating system)
66833 STOPPED (by user or operating system)
66851 STOPPED (by user or operating system)
66866 STOPPED (by user or operating system)
66883 STOPPED (by user or operating system)
66897 STOPPED (by user or operating system)
66911 STOPPED (by user or operating system)
66925 STOPPED (by user or operating system)
66942 STOPPED (by user or operating system)
66960 STOPPED (by user or operating system)
66977 STOPPED (by user or operating system)
66994 STOPPED (by user or operating system)
67010 STOPPED (by user or operating system)
67025 STOPPED (by user or operating system)
67039 STOPPED (by user or operating system)
67054 STOPPED (by user or operating system)
67070 STOPPED (by user or operating system)
67087 STOPPED (by user or operating system)
67101 STOPPED (by user or operating system)
67119 STOPPED (by user or operating system)
67140 STOPPED (by user or operating system)
67157 STOPPED (by user or operating system)
67171 STOPPED (by user or operating system)
67188 STOPPED (by user or operating system)
67202 STOPPED (by user or operating system)
67217 STOPPED (by user or operating system)
67232 STOPPED (by user or operating system)
67259 STOPPED (by user or operating system)
67297 STOPPED (by user or operating system)
67314 STOPPED (by user or operating system)
67332 STOPPED (by user or operating system)
67362 STOPPED (by user or operating system)
67402 STOPPED (by user or operating system)
67432 STOPPED (by user or operating system)
67463 STOPPED (by user or operating system)
67494 STOPPED (by user or operating system)
67518 STOPPED (by user or operating system)
67543 STOPPED (by user or operating system)
67558 STOPPED (by user or operating system)
67578 STOPPED (by user or operating system)
67595 STOPPED (by user or operating system)
67638 STOPPED (by user or operating system)
67656 STOPPED (by user or operating system)
67686 STOPPED (by user or operating system)
67687 STOPPED (by user or operating system)
67722 STOPPED (by user or operating system)
67721 STOPPED (by user or operating system)
67763 STOPPED (by user or operating system)
67764 STOPPED (by user or operating system)
67794 STOPPED (by user or operating system)
67795 STOPPED (by user or operating system)
67835 STOPPED (by user or operating system)
67834 STOPPED (by user or operating system)
67883 STOPPED (by user or operating system)
67882 STOPPED (by user or operating system)
2056 STOPPED (by user or operating system)
2099 STOPPED (by user or operating system)
2420 STOPPED (by user or operating system)
2443 STOPPED (by user or operating system)
4259 STOPPED (by user or operating system)
Only Daemons for the current Gradle version are displayed. For more on this, please refer to https://docs.gradle.org/8.3/userguide/gradle_daemon.html#sec:status in the Gradle documentation.
Flutter Doctor output
Doctor output
% flutter doctor -v
[✓] Flutter (Channel stable, 3.13.4, on macOS 14.0 23A339 darwin-arm64, locale zh-Hans-CN)
• Flutter version 3.13.4 on channel stable at /Volumes/Extra/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 367f9ea16b (29 hours ago), 2023-09-12 23:27:53 -0500
• Engine revision 9064459a8b
• Dart version 3.1.2
• DevTools version 2.25.0
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /Volumes/extra/Android/sdk/
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = /Volumes/extra/Android/sdk/
• Java binary at: /Users/vickyleu/Applications/Android Studio Iguana 2023.2.1 Canary 1.app/Contents/jbr/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.8+0-17.0.8b1000.8-10699129)
• All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
• Xcode at /Applications/Xcode-beta.app/Contents/Developer
• Build 15A5219j
• CocoaPods version 1.12.0
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[!] Android Studio (version unknown)
• Android Studio at /Users/vickyleu/Applications/Android Studio Iguana 2023.2.1 Canary 1.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
✗ Unable to determine Android Studio version.
• Java version OpenJDK Runtime Environment (build 17.0.8+0-17.0.8b1000.8-10699129)
[✓] IntelliJ IDEA Ultimate Edition (version 2023.2.1)
• IntelliJ at /Users/vickyleu/Applications/IntelliJ IDEA Ultimate.app
• Flutter plugin version 75.1.4
• Dart plugin version 232.9559.10
[✓] Connected device (3 available)
• Pixel 4 XL (mobile) • 98121FFBA0004A • android-arm64 • Android 13 (API 33)
• macOS (desktop) • macos • darwin-arm64 • macOS 14.0 23A339 darwin-arm64
• Chrome (web) • chrome • web-javascript • Google Chrome 117.0.5938.62
! Error: Browsing on the local area network for iPhone13 Pro. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
Metadata
Metadata
Assignees
Labels
r: duplicateIssue is closed as a duplicate of an existing issueIssue is closed as a duplicate of an existing issue