nnmatveev / idea-plugin-protobuf

Google Protocol Buffes support for Intellij IDEA
Other
120 stars 39 forks source link

It seems that it doesn't compile on Android Studio #61

Open fipil opened 9 years ago

fipil commented 9 years ago

Hi, I installed the plugin to the Android Studio 1.1. I also se the outpur directory to my /app/src/main/java and put to the same directory some Test.proto file. It seems that the Android Studio then recognised the .proto file and properly colors and checks the file code. But I cannot find the generated java classes, it seems that the protobuf compiler is not called.

Am I doing something wrong?

tcripps commented 9 years ago

Filip,

It’s hard to say what’s happening. I honestly have never used Android Studio, but I’d guess it’s much the same as IDEA. Did you install protocol buffers on your machine and set the protoc compiler path in the preferences?

Travis

On Apr 9, 2015, at 5:49 AM, Filip Nowak notifications@github.com wrote:

Hi, I installed the plugin to the Android Studio 1.1. I also se the outpur directory to my /app/src/main/java and put to the same directory some Test.proto file. It seems that the Android Studio then recognised the .proto file and properly colors and checks the file code. But I cannot find the generated java classes, it seems that the protobuf compiler is not called.

Am I doing something wrong?

— Reply to this email directly or view it on GitHub.

fipil commented 9 years ago

Hi Travis, yes I set the path to the protoc compiler. Should I add something to my build.gradle?

tcripps commented 9 years ago

Great. It sounds like you have set things up correctly. If you’re invoking a gradle build script, you may be bypassing the plugin’s build hooks. It hooks into the build system that’s built into Jetbrains’ Java-based IDEs. That’s something I probably would need to experiment with to know for sure.

Travis

On Apr 9, 2015, at 10:55 AM, Filip Nowak notifications@github.com wrote:

Hi Travis, yes I set the path to the protoc compiler. Should I add something to my build.gradle?

— Reply to this email directly or view it on GitHub.

fipil commented 9 years ago

Great, thanks. Let me know if I can assist you with anything.

bedinsky commented 9 years ago

Hi Travis, plugin is not working with Android Studio, java classes cannot be generated even if i've configured protoc path and output directory. There is one thing that is confusing me, I got this 2 logs in console: 14.27.51 Frameworks detected: Protobuf Facet framework is detected in the project Configure 14.29.54 Framework configuration incomplete: Please specify the output directory in the Protocol Buffers facet configuration for module app. "Configure"

"Configure" is a link that open a dialog called "Project Structure" that is completely different from the one that I can open with Ctrl-Alt-Shift-S. It seems that Android Studio is different from IntelliJ not only because of gradle build

Dmitry-Borodin commented 9 years ago

Bedinsky, when you click to "configure" you see Idea's project configuration. Othervice, you'll see studio's, wich is different. Got the same problem. Studio forsing us to run all the biulding scripts in gradle, including protobuf compilation. I will compile files manually for now, bash script.