20181008 is always wrong could not resolve com.android.com support:appcompat-v7 :28.0.0
1. First, I suspected that I had downgraded jdk 1.8 some days ago, so I reinstalled jdk 10
java --version
java 10.0.2 2018-07-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.2+13)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.2+13, mixed mode)
2, exit AS, re-build a new project, still these errors
3, then suspect the SDK, confirm from api19 to api28 are correctly installed, start over, still errors
4, Reference.
https://stackoverflow.com/questions/51733748/unable-to-resolve-dependency-for-appdebug-compileclasspath-could-not-resolv
5、Remove offline
*** I am going to work online anyway
Menu: File -- Other Settings -- Default setting--Build, Excution, Deployment--Gradle
Find the Offline work on the right and uncheck it!
6、Or open Preference
*** My Mac is used to setting it from here
*** The 2 places above are not exactly the same!
7, open build.gradle and sync now again, and this time it's all over!