qt android 第一个helloworld

在尝试创建新的安卓应用并构建APK时,遇到了一个错误:无法找到BuildTools 32.1.0版本。解决方案是修改gradle.properties文件,将androidBuildToolsVersion的值改为27.0.3。这表明buildToolsVersion必须大于或等于CompileSdkVersion,并且需要在SDK Manager中安装相应的build-tools版本。
摘要由CSDN通过智能技术生成

1、(搭建环境略),新建安卓应用,点击项目->Build Android APK->Create templates。(先不签名)

2、运行

出现错误:

FAILURE: Build failed with an exception.

* What went wrong:

A problem occurred configuring root project 'android-build'.

> Failed to find Build Tools revision 32.1.0

 Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

 解决:到D:\cx\test\testandroid\testandroid\android目录,记事本打开gradle.properties。将androidBuildToolsVersion=32.1.0改为androidBuildToolsVersion=27.0.3

解释:CompileSdkVersion:是告诉gradle 用哪个SDK版本来编译,和运行时要求的版本号没有关系;使用任何新添加的 API 就需要使用对应 Level 的 Android SDK。

buildToolsVersion: android构建工具的版本,在SDK Manager中安装选择版本,buildToolsVersion的版本需要>=CompileSdkVersion; 高版本的build-tools 可以构建低版本编译的android程序

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值