找不到android的sdk,CircleCI – 找不到Android Studio项目的SDK位置

尝试在CircleCI上构建项目时,在gradle构建期间发生以下错误.这个问题的原因是什么?我正在运行CircleCI 2.0.

FAILURE: Build failed with an exception.

What went wrong: A problem occurred configuring project ‘:app’.

SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.

>尝试:使用–stacktrace选项运行以获取堆栈跟踪.使用–info或–debug选项运行以获取更多日志输出.

>在https://help.gradle.org获得更多帮助

在18s建立失败退出代码1

这是我的config.yml看起来像:

# Java Gradle CircleCI 2.0 configuration file

#

# Check https://circleci.com/docs/2.0/language-java/ for more details

#

version: 2

jobs:

build:

docker:

# specify the version you desire here

- image: circleci/openjdk:8-jdk

# Specify service dependencies here if necessary

# CircleCI maintains a library of pre-built images

# documented at https://circleci.com/docs/2.0/circleci-images/

# - image: circleci/postgres:9.4

working_directory: ~/repo

environment:

# Customize the JVM maximum heap limit

JVM_OPTS: -Xmx3200m

TERM: dumb

steps:

- checkout

# Download and cache dependencies

- restore_cache:

keys:

- v1-dependencies-{{ checksum "build.gradle" }}

# fallback to using the latest cache if no exact match is found

- v1-dependencies-

- run: gradle dependencies

- save_cache:

paths:

- ~/.m2

key: v1-dependencies-{{ checksum "build.gradle" }}

# run tests!

- run: gradle test

解决方法:

CircleCI for Android提供了一个sample configuration,它可以处理您遇到的SDK问题.我不确定为什么他们在设置新项目时不会显示此选项.

基本上,当您设置一个新项目以遵循CircleCI时,您可能选择了Gradle(Java)选项.这并不专门针对Android,所以这就是为什么它抱怨缺少SDK.

上面链接的示例配置如下所示(最重要的部分是指定的docker镜像,CircleCI文档很好地解释了每行的作用):

version: 2

jobs:

build:

working_directory: ~/code

docker:

- image: circleci/android:api-25-alpha

environment:

JVM_OPTS: -Xmx3200m

steps:

- checkout

- restore_cache:

key: jars-{{ checksum "build.gradle" }}-{{ checksum

"app/build.gradle" }}

- run:

name: Download Dependencies

command: ./gradlew androidDependencies

- save_cache:

paths:

- ~/.gradle

key: jars-{{ checksum "build.gradle" }}-{{ checksum

"app/build.gradle" }}

- run:

name: Run Tests

command: ./gradlew lint test

- store_artifacts:

path: app/build/reports

destination: reports

- store_test_results:

path: app/build/test-results

希望你尽快建立好!

标签:android,circleci

来源: https://codeday.me/bug/20190727/1551060.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/419536.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

选项卡,下拉菜单操做时的页面数据更新,highcharts,d3 结合。

1.选项卡:给要选中的元素添加css样式,加active,单击时先移除active,再把当前单击元素添加active。 单击时页面切换,按钮和页面要有关联,通过获取$(this).text();年龄,教育,职业&…

oracle之数据处理之约束练习

57. 定义非空约束1). 非空约束只能定义在列级.2). 不指定约束名create table emp2 (name varchar2(30) not null, age number(3));3). 指定约束名 create table emp3(name varchar2(30) constraint name_not_null not null, age number(3));58. 唯一约束1). 列级定义①. 不指定…

小米9android系统怎么关闭,小米MIUI系统怎么禁用虚拟键 小米MIUI系统禁用虚拟键方法...

想新很多米粉对对miui系统不会陌生。这个系统还很是不错。但是刚刚入手小米手机的米粉可能就不太熟悉了。那么,虚拟键要怎么去禁用呢?下面就一起来看看小米MIUI系统虚拟键禁用方法。大家用安卓手机的时候是否曾遇到过以下折磨人的场景:小米MI…

C#性能优化:延迟初始化LazyT

1. 概述 我们创建某一个对象需要很大的消耗,而这个对象在运行过程中又不一定用到,为了避免每次运行都创建该对象,这时候延迟初始化(也叫延迟实例化)就出场了。 延迟初始化出现于.NET 4.0,主要用于提高性能&…

android手机值不值得买,安卓直屏Redmi K40手机值得买吗?

描述还记得我们上一次谈论直屏与曲面屏的关系吗?小Z从后台留言中发现了很多人确实对如今清一色的旗舰曲面屏感到不满,用着远没有几年前的直屏来得顺手。但在如今的手机市场中,想要找到一款屏幕素质不错,硬件配置足够旗舰&#xff…

oracle之数据处理之视图

--创建视图 create view empview as select employee_id,last_name,salary from employees where department_id80;--查询视图 select * from empview--修改视图 update empview set salary20000 where employee_id179 运行结果 --修改视图 create or replace view empview2 a…

simplified build configuration

http://blogs.msdn.com/b/saraford/archive/2005/08/16/452411.aspx Did you know… That you can hide the solution and advanced build configurations Under Tools – Options – Projects and Solutions – General, there are options for both Always show solution and…

oracle之数据处理之视图练习

62. 查询员工表中 salary 前 10 的员工信息.select last_name, salary from (select last_name, salary from employees order by salary desc) where rownum < 10说明: rownum "伪列" ---- 数据表本身并没有这样的列, 是 oracle 数据库为每个数据表 "加上的…

android集合优化,android-性能优化之集合类优化

优化包括&#xff1a;I/O的优化、网络操作的优化、内存的优化、数据结构的优化、代码层次的优化、UI渲染优化、CPU资源使用率的优化、异常处理的优化等》ArrayList和VectorArrayList和Vector都是内部以数组实现的List&#xff0c;它们两唯一的区别就是对多线程的支持&#xff0…

oracle之数据处理之其他数据库对象

--创建序列 create sequence empseq increment by 10---每次增长10 start with 10--从10开始 maxvalue 100--提供最大值 cycle --循环 nocache --不需要缓存登录 运行结果 --查看 查看 select empseq.nextval from dual 运行结果 --创建表 create table emp11 as select empl…

android 线程太多,应用程序可能在其主线程上做了太多的工作。

任何开始开发android应用程序的人都会在logcat上看到这个消息。编舞(ABC)&#xff1a;跳过xx帧&#xff01;应用程序可能在其主线程上做了太多的工作。“那么&#xff0c;它到底意味着什么&#xff0c;你为什么要关心它&#xff0c;以及如何解决它。这意味着您的代码需要很长时…

关于Docker官方CentOS镜像无法启动mysqld的总结

很多童鞋反映&#xff0c;在Docker官方CentOS镜像中安装了Mysql server后&#xff0c;无法正常启动。 无法正常启动表现为两种情况&#xff1a; 1> 初始完数据库后&#xff0c;mysqld启动报错 2> systemctl start mysqld或者service mysqld start报错 首先重现一下现场。…

oracle之数据处理之其他数据库对象练习

1. 创建序列dept_id_seq&#xff0c;开始值为200&#xff0c;每次增长10&#xff0c;最大值为10000 a) create sequence dept_id_seq b) start with 200 c) increment by 10 d) maxvalue 10000 2. 使用序列向表dept中插入数据 a) insert into dept01 b) values(dept_id_seq.nex…

android 刷rom,刷ROM是什么?刷ROM是什么意思?

刷ROM是什么意思首先&#xff0c;ROM是由英文Read only Memory的首字母构成的&#xff0c;意为只读存储器。顾名思义&#xff0c;就是这样的存储器只能读&#xff0c;不能像RAM一样可以随时读和写。它只允许在生产出来之后有一次写的机会&#xff0c;数据一旦写入则不可更改。它…

网站

Json解析&#xff1a;http://json.tongxiehui.net/ MD5破解&#xff1a;http://www.cmd5.com/转载于:https://www.cnblogs.com/Eazy/p/4840789.html

oracle之set运算符和练习

--创建表 create table emp01 as select * from employees where department_id in (70,80)-- --创建表 create table emp02 as select * from employees where department_id in (80,90) --查询 --并集 select * from employees where department_id in (70,80) union all se…

html自动加https,http自动跳转https的配置方法

IIs中实现Http自动转换到Https方法介绍 (403跳转对SEO有一定影响)1.下载安装URL重写模块&#xff1a;Microsoft URL Rewrite Module32位&#xff1a;http://download.microsoft.com/download/4/9/C/49CD28DB-4AA6-4A51-9437-AA001221F606/rewrite_x86_zh-CN.msi64位&#xff1a…

活动页面html设计,活动查看页面.html

&#xfeff;活动查看页面$axure.utils.getTransparentGifPath function() { return resources/images/transparent.gif; };$axure.utils.getOtherPath function() { return resources/Other.html; };$axure.utils.getReloadPath function() { return resources/reload.html…

《程序员在第一季度追姐姐的书》——提升自己的形象气质

去年&#xff0c;许久没有联系我的高中女同学&#xff1b;突然给我发来了QQ消息。丝毫不犹豫的点击开她的QQ空间。这家伙都已经变成大美女了。。此处省去一万字..... 原来是找我给她p图来了。。一看她的QQ空间里面的说说&#xff0c;这才得知原来妹子已经恢复单身啦&#xff0c…