「Unity/多言語化/Androidのアプリ名」の版間の差分

提供: 初心者エンジニアの簡易メモ
ナビゲーションに移動 検索に移動
 
(同じ利用者による、間の5版が非表示)
12行目: 12行目:
  Providing Android resources in Assets/Plugins/Android/res was removed, please move your resources to an AAR or an Android Library. See "AAR plug-ins and Android Libraries" section of the Manual for more details.
  Providing Android resources in Assets/Plugins/Android/res was removed, please move your resources to an AAR or an Android Library. See "AAR plug-ins and Android Libraries" section of the Manual for more details.


Unity2021.3LTSからこのようなエラーが出るっぽい。
====対策方法====
#Assets/Plugins/Androidの下にres.androidlibを作る
#Assets/Plugins/Androidの下にres.androidlibを作る
#以下をres.androidlibの下に作る
#以下をres.androidlibの下に作る
<pre>
 
AndroidManifest.xml
*AndroidManifest.xml
project.properties
*project.properties
res
*res
</pre>
 
AndroidManifest.xml
AndroidManifest.xml
<pre>
<pre>
33行目: 36行目:
android.library=true
android.library=true
</pre>
</pre>
Assets/Plugins/Android/res.androidlib/res/values-ja/strings.xml
<pre>
<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">タイトル1</string>
</resources>
</pre>
これで、アプリ名を日本語にできた。


参考:https://kingmo.jp/kumonos/unity-2021lts-res-folda-build-error/
参考:https://kingmo.jp/kumonos/unity-2021lts-res-folda-build-error/

2023年10月29日 (日) 05:37時点における最新版

Androidのアプリタイトルの多言語化対応方法

Assets/Plugins/Android/res/values-ja/strings.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">タイトル1</string>
</resources>

Assets/Plugins/Android/res was removedエラーが出る問題

エラー詳細

Providing Android resources in Assets/Plugins/Android/res was removed, please move your resources to an AAR or an Android Library. See "AAR plug-ins and Android Libraries" section of the Manual for more details.

Unity2021.3LTSからこのようなエラーが出るっぽい。

対策方法

  1. Assets/Plugins/Androidの下にres.androidlibを作る
  2. 以下をres.androidlibの下に作る
  • AndroidManifest.xml
  • project.properties
  • res

AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="custom.android.res"
          android:versionCode="1"
          android:versionName="1.0">
</manifest>

project.properties

target=android-9
android.library=true

Assets/Plugins/Android/res.androidlib/res/values-ja/strings.xml

<?xml version="1.0" encoding="utf-8"?>
<resources>
    <string name="app_name">タイトル1</string>
</resources>

これで、アプリ名を日本語にできた。

参考:https://kingmo.jp/kumonos/unity-2021lts-res-folda-build-error/