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.
When build and flash the APEX from tm-mainline-prod, you may see the error below.
```
[INSTALL_FAILED_VERSION_DOWNGRADE: Downgrade of APEX package com.google.android.tethering is not allowed. Active version: 990090000 attempted: 339990000])
```
This is because the device is flashed with AOSP built from master or other branches, which has
prebuilt APEX with higher version. We can use root access to replace the prebuilt APEX with the APEX