First time using protobuf, so following googles instructions I placed all my .protos in a protos folder in my android studio project. I know the .proto files are setup correctly. I compile the files from that folder using:
protoc -I=. --java_out=. --kotlin_out=. filename.proto
This generates a bunch of kotlin and java files that look like what I am supposed to get. However, android studio throws a ton of errors and doesn't seem to like most of the code in those files.
So my question is there something additional I need to do with the setup, bring in a dependency in the gradle file? I saw an example like that but it seemed only relevant to the plugin for compiling using gradle - since I'm compiling from the command line I don't think I should need that?
protobuf-javalite
, which may subsequently lead to a dependency conflict. Android Java is not necessarily the same as "Java".option 'lite'
is also a matter of performance. That Kotlin example on GitHub is the anti-pattern, which not to follow on Android. You don't get to choose. – Rockies