Android 编译launcher3

时间:2024-04-11 21:29:38
错误
> protoc: stdout: . stderr: C:\Users\Administrator\Desktop\Launcher3\Launcher3\src\main\proto: warning: directory does not exist.\build\extracted-protos\main: warning: directory does not exist.
  C:\Users\Administrator\Desktop\Launcher3\Launcher3\build\extracted-include-protos\main: warning: directory does not exist.
  C:\Users\Administrator\Desktop\Launcher3\Launcher3\src\debug\proto: warning: directory does not exist.
  C:\Users\Administrator\Desktop\Launcher3\Launcher3\build\extracted-protos\debug: warning: directory does not exist.
  C:\Users\Administrator\Desktop\Launcher3\Launcher3\build\extracted-include-protos\debug: warning: directory does not exist.
  C:\Users\Administrator\Desktop\Launcher3\Launcher3\src\debug\proto: warning: directory does not exist.
  C:\Users\Administrator\Desktop\Launcher3\Launcher3\build\extracted-protos\debug: warning: directory does not exist.
  C:\Users\Administrator\Desktop\Launcher3\Launcher3\build\extracted-include-protos\debug: warning: directory does not exist.

  Missing output directives.

解决方法:

Android 编译launcher3

//protobuf {
//    // Configure the protoc executable
//    protoc {
//        artifact = 'com.google.protobuf:protoc:3.0.0-alpha-3'
//    }
//}
protobuf {
    protoc {
        artifact = "com.google.protobuf:protoc:3.0.0"
    }
    plugins {
        lite {
            artifact = "com.google.protobuf:protoc-gen-javalite:3.0.0"
        }
    }
    generateProtoTasks {
        all().each { task ->
            task.builtins {
                remove java
            }
            task.plugins {
                lite { }
            }
        }
    }
}