well_known_types_embed.cc - /bin/sh: js_embed: ไม่พบคำสั่ง

ฉันกำลังพยายามเรียกใช้ตัวอย่างจาก https://github.com/grpc/grpc/tree/master/examples/android/helloworld.

ฉันตรวจสอบว่าฉันมี:

Android SDK โปรโตคอล Android NDK grpc_cpp_plugin

นอกจากนี้ ฉันยังเรียกใช้ git submodule update --init ในพื้นที่เก็บข้อมูลเพื่อดาวน์โหลดการอ้างอิงทั้งหมด

เมื่อฉันรัน /gradlew installDebug --stacktrace

ฉันได้รับข้อผิดพลาดนี้:

Error while executing process 
/Users/myuser/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {--build /Users/..path../exampleAndroidUsingCPP/grpc/examples/android/helloworld/app/.externalNativeBuild/cmake/debug/x86 --target protoc}
[1/98] Generating ../../../../../../../../../../../../third_party/protobuf/src/google/protobuf/compiler/js/well_known_types_embed.cc
FAILED: cd /Users/..path../exampleAndroidUsingCPP/grpc/examples/android/helloworld/app/.externalNativeBuild/cmake/debug/grpc/outputs/x86/third_party/protobuf && js_embed /Users/..path../exampleAndroidUsingCPP/grpc/third_party/protobuf/src/google/protobuf/compiler/js/well_known_types/any.js /Users/..path../exampleAndroidUsingCPP/grpc/third_party/pr tobuf/src/google/protobuf/compiler/js/well_known_types/struct.js /Users/..path../exampleAndroidUsingCPP/grpc/third_party/protobuf/src/google/protobuf/compiler/js/well_known_types/timestamp.js > /Users/..path../exampleAndroidUsingCPP/grpc/third_party/protobuf/src/google/protobuf/compiler/js/well_known_types_embed.cc
/bin/sh: js_embed: command not found
ninja: build stopped: subcommand failed.

ฉันใช้สิ่งนี้ใน OSX

มีความคิดใดบ้างที่ฉันสามารถแก้ไขได้?

ขอบคุณ


person xarly    schedule 13.06.2018    source แหล่งที่มา


คำตอบ (2)


การสร้าง gRPC C++ สำหรับ Android ต้องมีการแก้ไขกฎการสร้าง protobuf (https://github.com/google/protobuf/pull/3878) ที่รวมเข้ากับ master แล้ว แต่ยังไม่ได้เปิดตัว

ตามที่ระบุไว้ใน https://github.com/grpc/grpc/blob/master/examples/android/helloworld/README.md ในขณะนี้ คุณต้องแก้ไขคำขอดึงข้อมูลนี้ด้วยตนเองใน third_party/protobuf ก่อนที่จะสร้าง gRPC สำหรับ Android คุณสามารถทำได้ด้วยคำสั่งต่อไปนี้จากไดเรกทอรีรากของที่เก็บ grpc:

cd third_party/protobuf
git cherry-pick cba18efe1861d1fc1eecd6dc2af86fc1f0d9922f
person Eric G    schedule 13.06.2018
comment
ใช่ ฉันรู้เกี่ยวกับปัญหานั้น แต่ฉันใช้มาสเตอร์อยู่ แต่ฉันตัดสินใจใช้ตัวเลือกเชอร์รี่ของคุณและยังคงแสดงข้อผิดพลาดเดิม ขอบคุณนะ :) - person xarly; 14.06.2018

ฉันทำให้มันใช้งานได้

ฉันคิดว่ามันเกี่ยวข้องกับการอัพเดต android Studio แต่พูดตามตรงฉันไม่แน่ใจ

ฉันล้างไดเร็กทอรีด้วยการเปลี่ยนแปลงใด ๆ ที่ทำกับบิลด์ที่ยังไม่เสร็จ (ยกเว้น local.properties ที่ฉันชี้ไปที่ sdk )

ฉันวิ่ง

 /gradlew installDebug --stacktrace

และผลงาน.

ฉันได้รับข้อผิดพลาดอื่น แต่เกิดขึ้นจริงด้วย gradlew ไม่พบอุปกรณ์สำหรับดำเนินโปรเจ็กต์ ฉันจึงเปิด Android Studio และใช้งานได้

person xarly    schedule 14.06.2018