1

我想尝试 Jetpack compose 并遵循这个README

cd path/to/checkout/frameworks/support/ui/
./studiow

在遵循指南时,当我尝试在目录中运行./studiow脚本时,出现此错误。ui

Running ./gradlew studio
usage: dirname path
Error: Could not find or load main class Projects.androidx-master-dev.frameworks.support.......prebuilts.fullsdk-darwin.platform-tools.api.api-versions.xml
See also development/diagnose-build-failure for help with build failures in this project.
4

2 回答 2

0

您现在不必克隆整个 ASOP。Jetpack compose gradle 依赖项现在可用。你可以用作

def compose_version = '0.1.0-dev01'
kapt "androidx.compose:compose-compiler:$compose_version"
kapt "androidx.compose:compose-runtime:$compose_version"
implementation("androidx.ui:ui-core:$compose_version")
implementation("androidx.ui:ui-layout:$compose_version")
implementation("androidx.ui:ui-framework:$compose_version")
implementation("androidx.ui:ui-material:$compose_version")
implementation("androidx.ui:ui-foundation:$compose_version")
implementation("androidx.ui:ui-text:$compose_version")
implementation "org.jetbrains.kotlin:kotlin-reflect"
于 2019-10-22T12:40:18.557 回答
0

经过一段时间的尝试。

以前我已经将项目克隆到某个目录中。androidx-master-dev在里面someDir someDir/androidx-master-dev

我不得不将它移回根~目录并且脚本工作。

于 2019-10-22T08:32:57.440 回答