小编Dro*_*hio的帖子

Kotlin 中函数“until”的未解析引用

我正在尝试将 Java 项目转换为 Kotlin。我收到一个非常奇怪的编译时错误,该函数直到是一个“未解决的引用”,为什么这个函数直到无法识别?

 fun renderChildrenToRight(canvas: Canvas, startIndex: Int, stopIndex: Int) {
    val itemRight = nodePosition!!.x + nodeRectLimits.right
    val itemExternalPaddingWidth = getRenderAttribute(AttributeExternalPaddingWidth, AttributeDefaultExternalPadding)
    val itemTop = nodePosition!!.y + nodeRectLimits.top
    val itemExternalPaddingHeight = getRenderAttribute(AttributeExternalPaddingHeight, AttributeDefaultExternalPadding)
    val childItemsSize = getChildItemsSize(startIndex, stopIndex)
    var nextItemTop = itemTop + childItemsSize / 2
    val x = itemRight + itemExternalPaddingWidth


    for (i in startIndex until stopIndex) {
        val currentNode = _children[i]
        val bulletDesiredHeight = currentNode.desiredHeightWithChildren
        val y = nextItemTop - bulletDesiredHeight / 2 …
Run Code Online (Sandbox Code Playgroud)

android kotlin android-gradle-plugin

1
推荐指数
1
解决办法
6281
查看次数

标签 统计

android ×1

android-gradle-plugin ×1

kotlin ×1