Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/351.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何在不使用Maven的情况下使用Wire生成.proto文件?_Java_Android_Android Studio_Protocol Buffers_Square Wire - Fatal编程技术网

Java 如何在不使用Maven的情况下使用Wire生成.proto文件?

Java 如何在不使用Maven的情况下使用Wire生成.proto文件?,java,android,android-studio,protocol-buffers,square-wire,Java,Android,Android Studio,Protocol Buffers,Square Wire,对于一个项目,我一直在使用Google协议缓冲区,但现在我想切换到Wire。我想用这样的终端编译我的.proto文件 protoc -I=$SRC_DIR --java_out=$DST_DIR $SRC_DIR/addressbook.proto (this is for the google protobufs) 这很简单 在Wire自述中,他们给出了以下示例: % java -jar wire-compiler-VERSION-jar-with-dependencies.jar \ --

对于一个项目,我一直在使用Google协议缓冲区,但现在我想切换到Wire。我想用这样的终端编译我的.proto文件

protoc -I=$SRC_DIR --java_out=$DST_DIR $SRC_DIR/addressbook.proto (this is for the google protobufs)
这很简单

在Wire自述中,他们给出了以下示例:

% java -jar wire-compiler-VERSION-jar-with-dependencies.jar \
--proto_path=src/main/proto \
--java_out=out \
squareup/dinosaurs/dinosaur.proto \
squareup/geology/period.proto
Writing com.squareup.dinosaurs.Dinosaur to out
Writing com.squareup.geology.Period to out
我不知道这是怎么回事,因为我没有jar文件。 以下是我的原始文件路径:

那么我需要在我的项目中包含一个jar文件吗?如果是,其中必须包含哪些文件? 或者在我的例子中,命令行是什么样子的