0
0

More than 1 year has passed since last update.

Android Studio(Arctic Fox/Bumblebee) + kotlin 1.6.10 でリリースビルドするとアプリの動作がおかしくなる件

Last updated at Posted at 2022-02-01

みなさんいかがお過ごしでしょうか?

私は寒いのと暑いのが両方嫌いなタイプですので、早くあったかくならないかなあと思っているところです。

でもどうせ寒いなら雪が少しでもふればいいのに、とも思うわけです。

氷じゃだめなんです!雪が必要なんです!

そうとう寒いのに全然雪が降らなかったら、何か損した気分になりますよね?
(ならないか。おかしいな。

あと、どうでもいいことかもしれませんが、最近のマイブームは公園にいってカモとコイに食パンをあげることです。
(餌あげていい場所です、これ大事。リストラされたサラリーマンみたいだな、って思わないように。

カモとコイを比べると、素早さが武道家と戦士くらい違うので、だいたいカモが先に食べるんですよね。

そんな他人に一切忖度をしないカモが好きになった今日この頃です。


さて、今回のお題はリリースビルドについてです。

Android Studio(Arctic Fox/Bumblebee)、gradle、perf-pluginの組み合わせでリリースビルドすると、
アプリの動作がおかしかったり(、ビルドできなかったり)したときのメモです。
(ハマっているかもしれないどなたかのお役に立てればと。

デバッグ実行すると問題ないのに、リリースビルドするとアプリは起動するけど、正しく動かないんですよね。

関わっているアプリでいうと、jsonのパース周りだということはわかっていたのですが、解決しなくて2か月くらい悩んでいました。

環境

Android Studio Arctic Fox | 2020.3.1 Patch 4
kotlin 1.5.31
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.google.firebase:perf-plugin:1.4.0'
→ アプリ動作に問題なし。

Android Studio Arctic Fox | 2020.3.1 Patch 4
kotlin 1.6.10
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.google.firebase:perf-plugin:1.4.0'
→ アプリ動作に問題あり。

Android Studio Arctic Fox | 2020.3.1 Patch 4
kotlin 1.6.10
classpath 'com.android.tools.build:gradle:7.1.0'
classpath 'com.google.firebase:perf-plugin:1.4.0'
→ ビルドできない。
Unable to load class 'com.android.build.api.extension.AndroidComponentsExtension'.
This is an unexpected error. Please file a bug containing the idea.log file.

Android Studio Arctic Fox | 2020.3.1 Patch 4
kotlin 1.6.10
classpath 'com.android.tools.build:gradle:7.1.0'
classpath 'com.google.firebase:perf-plugin:1.4.1'
→ ビルドできない。
This version of the Android Support plugin for IntelliJ IDEA (or Android Studio) cannot open this project, please retry with version 2021.1.1 or newer.

Android Studio Bumblebee | 2021.1.1 ※最近安定版が出たばかり。
kotlin 1.5.31
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.google.firebase:perf-plugin:1.4.0'
→ アプリ動作に問題なし。

Android Studio Bumblebee | 2021.1.1 ※最近安定版が出たばかり。
kotlin 1.5.31
classpath 'com.android.tools.build:gradle:7.1.0'
classpath 'com.google.firebase:perf-plugin:1.4.1'
→ アプリ動作に問題なし。

Android Studio Bumblebee | 2021.1.1 ※最近安定版が出たばかり。
kotlin 1.6.10
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.google.firebase:perf-plugin:1.4.1'
→ アプリ動作に問題あり。

Android Studio Bumblebee | 2021.1.1 ※最近安定版が出たばかり。
kotlin 1.6.10
classpath 'com.android.tools.build:gradle:7.0.4'
classpath 'com.google.firebase:perf-plugin:1.4.0'
→ アプリ動作に問題あり。

Android Studio Bumblebee | 2021.1.1 ※最近安定版が出たばかり。
kotlin 1.6.10
classpath 'com.android.tools.build:gradle:7.1.0'
classpath 'com.google.firebase:perf-plugin:1.4.0'
→ ビルドできない。
Unable to load class 'com.android.build.api.extension.AndroidComponentsExtension'.
This is an unexpected error. Please file a bug containing the idea.log file.

Android Studio Bumblebee | 2021.1.1 ※最近安定版が出たばかり。
kotlin 1.6.10
classpath 'com.android.tools.build:gradle:7.1.0'
classpath 'com.google.firebase:perf-plugin:1.4.1'
→ アプリ動作に問題なし。

解決できなくてしばらく①でリリースビルドをしていたのですが、
⑩で問題が解決しました。(表にしたらよかった・・。

kotlin 1.6.10 使うには Android Studio Bumblebee を待つしかなかったということなんだろうか・・・。

今回は以上です。

0
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
0
0