Fixed
Status Update
Comments
xi...@google.com <xi...@google.com>
au...@google.com <au...@google.com> #3
I don't think this is under android studio editing, this seems to be a gradle sync problem
ga...@google.com <ga...@google.com> #4
The issue can be reproduced by:
- creating a new project in H C15
- create
nested_build
withnested_build/settings.gradle
- run
ln -s nested_build/ nested_symbolic
- in
$rootProject/settings.gradle
add:includeBuild("nested_symbolic")
Sync fails with:
Build not found: BuildId(buildRoot=/usr/local/google/home/gavra/AndroidStudioProjects/MyApplication18/nested_symbolic)
available builds {BuildId(buildRoot=/usr/local/google/home/gavra/AndroidStudioProjects/MyApplication18)=:, BuildId(buildRoot=/usr/local/google/home/gavra/AndroidStudioProjects/MyApplication18/nested_build)=:nested_symbolic}
The issue is that there is a mix of canonical and non-canonical paths during import.
ga...@google.com <ga...@google.com> #5
This is going to be fun:
- we can fix this particular issue in Android Studio, but...
- importing non-Android Gradle project that uses symlinked included builds
, because...in IDEA fails - some APIs in Gradle return canonical path (e.g.
Project.projectDir
) while others (e.g.org.gradle.tooling.model.BuildIdentifier#getRootDir
) do not canonicalize paths.
ga...@google.com <ga...@google.com> #6
The fix landed in Studio - ag/I2634cc214b0348c5c2a282294077c44def5e9fcf.
Tracking the IDEA change and adding a test in
au...@google.com <au...@google.com> #7
Could we land this in AS H since this is a regression from AS G
ga...@google.com <ga...@google.com> #8
Just landing this change does not work, any symlinked included build will break the import because of
Description
In the AndroidX github build, we symlink a
buildSrc
folder. Starting on Hedgehog canary 15, project import fails with an error:It fails to find
buildRoot=/Users/yboyar/src/androidx/collection/buildSrc
but that folder is actually a symlink to/Users/yboyar/src/androidx/buildSrc
which is in the list of available builds. It seems like some code resolves it to cannonical path but others doesn't, causing the issue.To reproduce:
clone AndroidX github:https://github.com/androidX/androidx
cd collection && ./gradlew studio