Android Studio (canary) gradle files fail to sync |
|||||||
Issue descriptionAndroid studio 3.4 canary 8 I followed the steps in https://chromium.googlesource.com/chromium/src/+/HEAD/docs/android_studio.md but with a modification to the generate_gradle.py step: build/android/gradle/generate_gradle.py --output-directory out/and --canary --target //chrome/android:chrome_public_apk Upon gradle sync, I get the following error: ERROR: Could not set unknown property 'bootClasspath' for object of type org.gradle.api.tasks.compile.CompileOptions. This occurs in the following generated file: out/and/gradle/chrome/android/chrome_public_apk/build.gradle Context: tasks.withType(JavaCompile) { options.bootClasspath = "[u'/usr/local/google/home/dewittj/src/chrome/src/out/and/lib.java/third_party/android_tools/android.jar']" } If I remove the bootClasspath line then I have no errors.
,
Dec 20
Thanks. I am using single target build because _all does not seem to let me debug. I can open a separate bug for that issue if you like.
,
Dec 20
Hmm... I think that is the bigger issue here. A separate bug for _all debugging would be nice, thanks. Please assign it to me.
,
Dec 20
,
Dec 20
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/95d6c5b393eb5ce43fdbc998493a22bdedd47dcf commit 95d6c5b393eb5ce43fdbc998493a22bdedd47dcf Author: Peter Wen <wnwen@chromium.org> Date: Thu Dec 20 23:47:44 2018 Android: Remove obsolete option for gradle This option no longer exists in Android Studio 3.4+. Bug: 917016 Change-Id: I533d40288faf2693ad32fe9646d48073c30ac7c8 Reviewed-on: https://chromium-review.googlesource.com/c/1387155 Commit-Queue: Peter Wen <wnwen@chromium.org> Reviewed-by: agrieve <agrieve@chromium.org> Cr-Commit-Position: refs/heads/master@{#618383} [modify] https://crrev.com/95d6c5b393eb5ce43fdbc998493a22bdedd47dcf/build/android/gradle/android.jinja [modify] https://crrev.com/95d6c5b393eb5ce43fdbc998493a22bdedd47dcf/build/android/gradle/generate_gradle.py [modify] https://crrev.com/95d6c5b393eb5ce43fdbc998493a22bdedd47dcf/build/android/gyp/write_build_config.py
,
Jan 3
,
Jan 4
There is another problem preventing sync: "The minSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file." Seems like https://cs.chromium.org/chromium/src/build/android/gradle/manifest.jinja?rcl=bd96ec76b2bc6e7d6d4f714d3aa2bb6edb3998a3&l=9 needs to be updated as well.
,
Jan 7
Sure, sounds like you've identified the problem. I'll reassign this to you then.
,
Jan 7
Seems like the problem is a little more involved. See https://crrev.com/c/1398398 Unless we add further custom processing of Android Manifests for single targets, this will be something that each dev has to remove. If you have a better suggestion or would like to add custom processing, let me know and I'd be happy to do code reviews. For now I've added explanation in the docs: https://crrev.com/c/1398396
,
Jan 9
The original issue is fixed. The new issue about minSdk and targetSdk is tracked here: https://crbug.com/841529
,
Jan 9
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/f8cc36fec254765b28a61075474dedb6cbd31b10 commit f8cc36fec254765b28a61075474dedb6cbd31b10 Author: Peter Wen <wnwen@chromium.org> Date: Wed Jan 09 17:52:31 2019 Android: Update android studio instructions Native files require all variants to be synced with gradle. Thus we must turn off "only sync active variant" optimization in newer Android Studio versions. Also add instructions for handling AndroidManifest.xml errors. Bug: 620034, 917016 Change-Id: I00370328226c6cfe05de02f08188d74c32e97056 Reviewed-on: https://chromium-review.googlesource.com/c/1398396 Reviewed-by: Justin DeWitt <dewittj@chromium.org> Commit-Queue: Peter Wen <wnwen@chromium.org> Cr-Commit-Position: refs/heads/master@{#621212} [modify] https://crrev.com/f8cc36fec254765b28a61075474dedb6cbd31b10/docs/android_studio.md |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by wnwen@chromium.org
, Dec 20Owner: wnwen@chromium.org
Status: Assigned (was: Untriaged)