日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Android >内容正文

Android

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

發布時間:2023/12/10 Android 30 豆豆
生活随笔 收集整理的這篇文章主要介紹了 找不到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

總結

以上是生活随笔為你收集整理的找不到android的sdk,CircleCI – 找不到Android Studio项目的SDK位置的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。