Re: errorprone_plugin androidx update

35 views
Skip to first unread message

Peter Wen

unread,
Sep 5, 2019, 3:07:55 PM9/5/19
to Benjamin Joyce, java, Andrew Grieve, Tommy Nyquist

On Thu, Sep 5, 2019 at 3:01 PM Benjamin Joyce <bjo...@google.com> wrote:
Hi, I'm attempting to compile chrome with androidx.

I currently run into the error seen below error I was wondering:

1.  If the error below is related to the androidnullablecheck.java
2. Would this need to be changed to use androidx.annotion.Nullable for the move to androidx?
3. It seems whatever is being build is using the old android support library rather than androidx. I'm not sure where gen/base/base_java.javac.jar.errorprone.jar is taking it's cue to use android support library over androidx to build "tmp/tmpFrQJhA/gen/org/chromium/base/ApplicationState.java:13"


[49/3287] ACTION //base:base_java__compile_java_errorprone(//build/toolchain/android:android_clang_arm64)
FAILED: gen/base/base_java.javac.jar.errorprone.jar gen/base/base_java.javac.jar.errorprone.jar.info
python ../../build/android/gyp/javac.py --enable-errorprone @gen/base/base_java.sources
...
Traceback (most recent call last):
  File "../../build/android/gyp/javac.py", line 609, in <module>
    sys.exit(main(sys.argv[1:]))
  File "../../build/android/gyp/javac.py", line 604, in main


 CheckOutput
    raise CalledProcessError(cwd, args, stdout + stderr)
util.build_utils.CalledProcessError: Command failed: ( cd /usr/local/google/code/clankium/src/out/Debug; bin/errorprone -g -encoding UTF-8 -sourcepath 
.....
/tmp/tmpFrQJhA/gen/org/chromium/base/ApplicationState.java:13: error: package android.support.annotation does not exist
import android.support.annotation.IntDef;
                                 ^
/tmp/tmpFrQJhA/gen/org/chromium/base/ApplicationState.java:18: error: cannot find symbol
@IntDef({
 ^
  symbol: class IntDef
/tmp/tmpFrQJhA/gen/org/chromium/base/ChildBindingState.java:13: error: package android.support.annotation does not exist
import android.support.annotation.IntDef;
....
....
/tmp/tmpFrQJhA/gen/org/chromium/base/TraceRecordMode.java:18: error: cannot find symbol
@IntDef({
 ^
  symbol: class IntDef
16 errors





Andrew Grieve

unread,
Sep 5, 2019, 4:16:17 PM9/5/19
to Peter Wen, Benjamin Joyce, java, Andrew Grieve, Tommy Nyquist
Looks like those errors are because java_cpp_enum.py generates .java files that use android.support.

Here's a list of python files that probably need updating to androidx:
Reply all
Reply to author
Forward
0 new messages