gpt4 book ai didi

android - java.lang.IllegalStateException : function = , 计数 = 4,索引 = 4

转载 作者:行者123 更新时间:2023-12-04 04:31:08 24 4
gpt4 key购买 nike

我在构建项目时收到此错误

java.lang.IllegalStateException: function = <anonymous>, count = 4, index = 4
at androidx.compose.compiler.plugins.kotlin.lower.ComposerLambdaMemoization.wrapFunctionExpression(ComposerLambdaMemoization.kt:697)
at androidx.compose.compiler.plugins.kotlin.lower.ComposerLambdaMemoization.visitComposableFunctionExpression(ComposerLambdaMemoization.kt:544)
at androidx.compose.compiler.plugins.kotlin.lower.ComposerLambdaMemoization.visitFunctionExpression(ComposerLambdaMemoization.kt:608)
at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitFunctionExpression(IrElementTransformerVoid.kt:235)
at org.jetbrains.kotlin.ir.visitors.IrElementTransformerVoid.visitFunctionExpression(IrElementTransformerVoid.kt:24)
at org.jetbrains.kotlin.ir.expressions.impl.IrFunctionExpressionImpl.accept(IrFunctionExpressionImpl.kt:23)
at org.jetbrains.kotlin.ir.expressions.IrExpression.transform(IrExpression.kt:33)
at org.jetbrains.kotlin.ir.expressions.IrFunctionAccessExpression.transformChildren(IrFunctionAccessExpression.kt:48)
这是我的依赖项
implementation 'androidx.core:core-ktx:1.3.2'
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.material:material:1.3.0'
implementation "androidx.compose.ui:ui:1.0.0-beta06"
implementation "androidx.compose.material:material:1.0.0-beta06"
implementation "androidx.compose.ui:ui-tooling:1.0.0-beta06"
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.3.1'
implementation 'androidx.activity:activity-compose:1.3.0-alpha08'
implementation "androidx.navigation:navigation-compose:2.4.0-alpha01"
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.0.0-beta06"
Jetpack compose 曾经在 Artic Fox Canary 上为我工作得很好,但是当我在 Artic Fox Beta 1 上构建我的项目时,我得到了这个错误。

最佳答案

将所有 compose 库更新为 beta07 :

implementation "androidx.compose.ui:ui:1.0.0-beta07"
implementation "androidx.compose.material:material:1.0.0-beta07"
implementation "androidx.compose.ui:ui-tooling:1.0.0-beta07"
androidTestImplementation "androidx.compose.ui:ui-test-junit4:1.0.0-beta07"

implementation "androidx.navigation:navigation-compose:2.4.0-alpha01"
最好使用类似的东西:
ext {
compose_version = '1.0.0-beta07'
}
接着:
implementation "androidx.compose.ui:ui:$compose_version"
implementation "androidx.compose.material:material:$compose_version"
//...

关于android - java.lang.IllegalStateException : function = <anonymous>, 计数 = 4,索引 = 4,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67617728/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com