LoginSignup
2
0

More than 5 years have passed since last update.

Circle CIでAndroid Support Library v24.0.0を使ったプロジェクトのビルドを通すまで

Posted at

ほとんど Rocket.Chat.Android.LilyをCircle CIで自動ビルドしてFabric betaにアップロード で書いたのと変わりませんが、
今回は、会社の公式アプリをAndroid SDK v24対応するときにすこ~しだけハマったので、共有です。

android-24が無いと言われる

* What went wrong:
A problem occurred configuring project ':app'.
> failed to find target with hash string 'android-24' in: /usr/local/android-sdk-linux

Circle CIはすぐに最新のSDKには対応してくれないので、手動でDependencyを追加する必要があります。

Pre-dependency commands の末尾を以下のようにします

git submodule init && git submodule update
echo "sdk.dir="$ANDROID_HOME > local.properties 

echo y | android update sdk --no-ui --all --filter tools
echo y | android update sdk --no-ui --all --filter android-24 ## 追加 ##
echo y | android update sdk --no-ui --all --filter extra-android-m2repository,extra-android-support
echo y | android update sdk --no-ui --all --filter extra-google-m2repository,extra-google-google_play_services
echo y | android update sdk --no-ui --all --filter build-tools-24.0.0 ## 変更 ##

Java8を用意しろと言われる

> Building 65%Caused by: java.lang.RuntimeException: compileSdkVersion 'android-24' requires JDK 1.8 or later to compile.
> Building 65%  at com.android.build.gradle.tasks.factory.AndroidJavaCompile.compile(AndroidJavaCompile.java:44)
> Building 65%  at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:75)

なので、以前の記事でも書いてたように、環境変数のJAVA_HOMEを設定します。

key value
JAVA_HOME /usr/lib/jvm/jdk1.8.0

これで・・・

image

キタ━━━━(゚∀゚)━━━━!! となります。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0