【发布时间】:2019-12-11 17:03:30
【问题描述】:
我得到(使用:api 'com.squareup.wire:wire-runtime:3.0.2')
Execution failed for task ':app:generateProtos'.
unable to resolve 1 imports: testing/tastes/tastes.proto
searching 0 proto paths:
我的理解是我不需要在 gradle 中定义任何东西来寻找导入?
但是当它说searching 0 proto paths时,我不禁怀疑......
我的毕业生是:
wire { kotlin { android = true } }
文件结构是
-> proto
-> testing
-> people
-> person.proto
-> tastes
-> tastes.proto
我在person.proto 中的导入行是:import "testing/tastes/tastes.proto";
syntax = "proto2";
package testing.people;
option java_package = "com.testing.people";
import "testing/tastes/tastes.proto";
message WirePerson {
optional string name = 1;
repeated string picture_urls = 2;
optional testing.tastes.WirePersonTaste period = 5;
}
syntax = "proto2";
package testing.tastes;
option java_package = "com.testing.tastes";
message WirePersonTaste {
optional string taste = 1;
repeated string picture_urls = 2;
}
我将非常感谢任何帮助:)
【问题讨论】:
-
我无法重现该问题。这是一个测试项目:github.com/Egorand/wire-tastes
标签: square-wire