0

当我想

import com.google.protobuf.gradle.*
plugins {
id("com.android.application")
id("kotlin-android")
id( "kotlin-kapt")
id("com.google.protobuf") version "0.8.8"
}
protobuf {
protoc {
    // The artifact spec for the Protobuf Compiler
    artifact = "com.google.protobuf:protoc:3.10.0"
}

generateProtoTasks {
    all().forEach { task ->
        task.builtins {
            id("java") {
                option("lite")
            }
        }
        task.plugins{
        }
    }
}

但它不编译

Supplied javaHome must be a valid directory. You supplied: /private/var/folders/s2/1hxwshqx5s7390n1yzz8ryx00000gn/T/AppTranslocation/C581CED1-F986-4F8D-9968-FE8F18314539/d/Android Studio Preview.app/Contents/jre/Contents/Home
4

0 回答 0