android studio license agreement,Gradle, You have not accepted license agreements (Android SDK)

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!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值