なえ箱

メモを植えます

Cannot parse project property android.enableR8='' of type 'class java.lang.String' as boolean. Expected 'true' or 'false'. の解決方法【Unity】

この記事をシェアする

Unity2022にアップデートした際、

* What went wrong:
A problem occurred evaluating project ':launcher'.
> Failed to apply plugin 'com.android.internal.application'.
   > Cannot parse project property android.enableR8='' of type 'class java.lang.String' as boolean. Expected 'true' or 'false'.

のエラーが発生して、Androidビルドが通らない場合の解決方法のメモ。

解決方法

Custom Gradle Properties Templateを有効化していなかったら、

Player Settings > Publishing Settings > Build

から、Custom Gradle Properties Templateを有効化する。

Custom Gradle Properties Templateを有効化

有効化したら、記載の階層にある grableTemplate.properties を開き、

android.enableR8 の行をコメントアウトする。これで終了です。

android.enableR8をコメントアウト