Android Studio sync fails with "Plugin with id 'com.android.application' not found." |
||||
Issue descriptionI've been having an interesting issue with android studio recently. I've been unable to sync the project for several weeks with the following error: Plugin with id 'com.android.application' not found. I've tried on android studio versions 2.3, 3.0.1 and 3.1. I've also tried cleaning the project (gn clean) removing and regenerating the .gradle and .AndroidStudio* directories. Stack overflow suggests updating my gradle wrapper, but our project setup is unique and I've been unable to successfully manage that; gradle --version is currently 3.2.1. Any ideas of how I can fix this?
,
May 16 2018
,
May 16 2018
Have you tried removing the gradle project directory? Usually out/Debug/gradle completely? Generating with the flag "--beta" for 3.1 and "--canary" for Android Studio 3.2 should help get the right gradle wrapper. Another thing to try is File > Invalidate Cache and Restart.
,
May 16 2018
,
May 16 2018
This CL just landed, so syncing and adding --sdk AndroidStudioDefault will also decrease flakiness: https://crrev.com/c/1058308
,
May 16 2018
Tried everything in #3, it still throws the error. I'll try using the new flag after I sync.
,
May 17 2018
Are you using an updated android studio package from ubiquity? If you can try android-studio-canary, what's the canary number? It should be 14.
,
May 17 2018
Btw please make sure to run with at least android-studio-beta, i.e. Android Studio version 3.1 or higher. 3.1 is the latest stable and we tend to support newer releases only (i.e. 2.3 has been unsupported for a very long time).
,
May 17 2018
Not sure why android-studio-stable is not 3.1 yet, but android-studio-beta is actually the latest stable. Our ubiquity repos aren't updated frequently enough.
,
May 17 2018
I was able to get this working with a combination of the new flags and 3.1. Thanks for the help!
,
May 17 2018
Great! Sounds like the new flag helps. It will be made default shortly (within a couple weeks) to give folks time to get used to it and any bugs to be found and fixed.
,
May 17 2018
I guess the way that I actually fixed this is by opening the "gradle" directory as the project in Android Studio. Opening the individual chrome_public_* projects still doesn't work.
,
May 23 2018
Ah, yes, that is the recommended way of opening the project, through the entire "gradle" project dir.
,
May 23 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/efd172781a38cceaa26adb602fc632efe0d78e42 commit efd172781a38cceaa26adb602fc632efe0d78e42 Author: Peter Wen <wnwen@chromium.org> Date: Wed May 23 18:51:40 2018 Android: Default to Android Studio's SDK Enabling the default as per: https://crrev.com/c/1058308 Obviates the need to pass in `--sdk AndroidStudioDefault` and making local edits to //third_party/android_tools/sdk when updating the sdk. Update docs so that using the `gradle` folder when importing is more prominent. Bug: 620034, 843264 Change-Id: I3c3c56a7d15b57ce0aaa9d4029493dc574045ceb Reviewed-on: https://chromium-review.googlesource.com/1070453 Reviewed-by: agrieve <agrieve@chromium.org> Commit-Queue: Peter Wen <wnwen@chromium.org> Cr-Commit-Position: refs/heads/master@{#561184} [modify] https://crrev.com/efd172781a38cceaa26adb602fc632efe0d78e42/build/android/gradle/generate_gradle.py [modify] https://crrev.com/efd172781a38cceaa26adb602fc632efe0d78e42/docs/android_studio.md |
||||
►
Sign in to add a comment |
||||
Comment 1 by tedc...@chromium.org
, May 16 2018