Yes, I know there are dozens of posts on this subject but nothing I've tried is working.
I'm doing this running Gradle from the command line, not from Android Studio, and on Windows.
I've just deleted my previous Android SDK folder downloaded the latest Android SDK, and installed to C:\android-sdk
Ran:
sdkmanager "platform-tools" "build-tools;28.0.3" "platforms;android-26" "platforms;android-28"
then ran:
sdkmanager --licenses
and accepted every license,
with it's response: All SDK package licenses accepted
Then I run:
C:\Dev>SET ANDROID_HOME=C:/android-sdk&&SET PATH=C:/gradle-4.0/bin;%PATH%&&SET JAVA_HOME=C:/Program Files/Java/jdk1.8.0_31&&cd C:/Android/dev/ProgramName&&gradle clean
And get this error:
> You have not accepted the license agreements of the following SDK components:
[Android SDK Build-Tools 28.0.3, Android SDK Platform 28].
Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager.
ANDROID_HOME is set to the SDK directory.
I've tried building with different Gradle versions.
Deleting the licenses directory and re-running 'sdkmanager --licenses'
Most of the existing "solutions" are several years old
and many are for Linux command lines.
Since this seems to be happening from a Gradle build are there any Gradle options that might help?
I do have more than one Android SDK installed,
another one in C:\Program Files\android-sdk-windows,
but ANDROID_HOME is set to the SDK directory
I'm trying to use.
I've had this issue before and was able to resolve it, but I can't remember what I did, and it seems to be with the newer platforms;android-28.
UPDATE:
One reason this is important is that the Play Store will require
apps to have a target API of 28 by August, which is why I was
trying to do this build.
Just tried this, did --uninstall on "build-tools;28.0.3" and "platforms;android-28", leaving only platforms;android-26,
and installed "build-tools;28.0.2", re-did sdkmanager --licenses
and now it only gets the error:
> You have not accepted the license agreements of the following SDK components:
[Android SDK Build-Tools 28.0.2].
Thanks!