Add instruction to index classes auto-gened from proto.
All classes genreated from proto in my IDE are red, which means it
cannot be auto-appended and checked by the IDE. This problem has been
bothering me for a long time and severly impact my productivity.
Now I am able to fix it finally. Hope it can help others to work on
Nearby Mainline as well.
Test: atest NearbyUnitTests and end-to-end device tests
Ignore-AOSP-First: nearby_not_in_aosp_yet
Change-Id: I6708e5ca4c8e34bfff402dabe6aac9469476a5c2
diff --git a/nearby/README.md b/nearby/README.md
index 6925dc4..3801bfe 100644
--- a/nearby/README.md
+++ b/nearby/README.md
@@ -29,6 +29,20 @@
$ aidegen .
# This will launch Intellij project for Nearby module.
```
+Note, the setup above may fail to index classes defined in proto, such
+that all classes defined in proto shows red in IDE and cannot be auto-completed.
+To fix, you can mannually add jar files generated from proto to the class path
+as below. First, find the jar file of presence proto with
+```sh
+ls $ANDROID_BUILD_TOP/out/soong/.intermediates/packages/modules/Connectivity/nearby/service/proto/presence-lite-protos/android_common/combined/presence-lite-protos.jar
+```
+Then, add the jar in IDE as below.
+1. Menu: File > Project Structure
+2. Select Modules at the left panel and select the Dependencies tab.
+3. Select the + icon and select 1 JARs or Directories option.
+4. Select the JAR file found above.
+5. Click the OK button.
+6. Restart the IDE to index.
## Build and Install