Thread
#compose
    h

    Hanzhen

    2 years ago
    Hi, I tried to import support/ui in AS but got ‘Basedir support/ui/annotation does not exist’ error. I followed the steps in README.md in the same folder. AS version is 4.1 Canary 10.
    Adam Powell

    Adam Powell

    2 years ago
    run
    ./gradlew studio
    and it will give you a correctly configured android studio installation of the expected version
    (from the
    ui/
    subdirectory)
    you should not need to import the project explicitly
    h

    Hanzhen

    2 years ago
    I tried this as well, but had error: ‘Android Studio*.app not found’. After copied studio folder from ‘support’, I can open AS from the command. But still had the same error.
    Seems includeProject in settings.gradle can not set projectDir correctly.
    My gradle version is 6.5
    Adam Powell

    Adam Powell

    2 years ago
    what OS and version are you running on your development machine?
    h

    Hanzhen

    2 years ago
    macOS Mojave 10.14.6
    I figure out what was going on. I exited
    ./gradlew studio
    before it was finished, so
    studio
    task thought AS was updated but in fact it didn’t. I reported the issue and pushed a fix: https://android-review.googlesource.com/c/platform/frameworks/support/+/1333982
    Yet I still couldn’t start the studio:
    I update AS to 4.1.0.10, now it can be started.
    Do you have the same issue? Should I report it?
    But project can not sync because of this error:
    Basedir /*/androidx-master-dev/frameworks/support/ui/annotation does not exist
    .
    I think it’s because how we include the project, for instance:
    includeProject(":annotation:annotation-sampled", "../annotation/annotation-sampled")
    , it will not only include ``:annotation:annotation-sampled, but also parent project :annotation``, and for the parent project, it will try to search dir
    ui/annotation
    which is
    rootProjectDir/projectPath
    . In this case, apparently we don’t have
    support/ui/annotation
    but
    support/annotation
    .
    Solution would be include parent project manually in
    settings.gradle
    .
    After fixed above issues, AS asked me to upgrade
    Android Gradle Plugin
    to
    4.1.0-alpha10
    .
    @Adam Powell I still can not make it.
    Adam Powell

    Adam Powell

    2 years ago
    there is often a warning in the project about the duplicate project roots but I've never seen it refuse to proceed from there. Is that warning masking another error somewhere?
    h

    Hanzhen

    2 years ago
    @Adam Powell I deleted caches of Android Studio, everything is fine now.