0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Androidのgradle versionを上げたら起動しなくなった

Posted at

Gradle versionをポチポチと最新版に変更

gradle-7.0.2-all.zip -> gradle-7.4.2-bin.zip

distributionUrl=https://services.gradle.org/distributions/gradle-7.0.2-all.zip
-> distributionUrl=https://services.gradle.org/distributions/gradle-7.4.2-bin.zip

gradle:7.0.4 -> gradle:7.2.1

classpath 'com.android.tools.build:gradle:7.0.4'
-> classpath 'com.android.tools.build:gradle:7.2.1'

上げて動かそうとしたら。。。起動せず。

Non-fatal Exception: java.lang.RuntimeExceptionMissing type parameter.

Non-fatal Exception: java.lang.RuntimeException
Missing type parameter.
com.google.gson.reflect.TypeToken.getSuperclassTypeParameter (TypeToken.java:84)
com.google.gson.reflect.TypeToken.<init> (TypeToken.java:62)

解決方法

proguard-rules.proに下記を追加

# Retain generic signatures of TypeToken and its subclasses with R8 version 3.0 and higher.
-keep,allowobfuscation,allowshrinking class com.google.gson.reflect.TypeToken
-keep,allowobfuscation,allowshrinking class * extends com.google.gson.reflect.TypeToken

まだ openだけど解決したIssues
https://github.com/google/gson/issues/2069

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?