Android Studio 3.3.2 で Gradle Sync できない
ERROR: Unsupported method: AndroidProject.getVariantNames().
The version of Gradle you connect to does not support that method.
To resolve the problem you can change/upgrade the target version of Gradle you connect to.
Alternatively, you can ignore this exception and read other information from the model.
Android Studio でビルドできないのは Android Studio の experimental feature が原因ぽい。 Preferences > Experimental > Only sync active variant をオフにしたらエラーが出てたところは回避できた。
参考 : https://stackoverflow.com/questions/53498161/unsupported-method-androidproject-getvariantnames
Oracle JDK 12 環境でコマンドラインビルドできない
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use --status for details
FAILURE: Build failed with an exception.
* What went wrong:
Could not create service of type ScriptPluginFactory using BuildScopeServices.createScriptPluginFactory().
> Could not create service of type PluginResolutionStrategyInternal using BuildScopeServices.createPluginResolutionStrategy().
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 33s
--stacktrace
オプションをつけてログを見た感じ、Gradle 4.7 が Oracle JDK 12 に対応しておらずビルドに失敗するっぽい。 Gradle 5.1 にしてみたら通った。