facebook twitter hatena line email

「Unity/公開/Android」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(同じ利用者による、間の7版が非表示)
行29: 行29:
 
参考:http://nn-hokuson.hatenablog.com/entry/2017/09/05/202327
 
参考:http://nn-hokuson.hatenablog.com/entry/2017/09/05/202327
  
==trouble writing output: Too many field references to fit in one dex file: 71337; max is 65536.
+
==trouble writing output: Too many field references to fit in one dex file: 71337; max is 65536. You may try using multi-dex. If multi-dex is enabled then the list of classes for the main dex list is too large.エラーのとき==
You may try using multi-dex. If multi-dex is enabled then the list of classes for the main dex list is too large.エラーのとき==
+
 
 
AndroidのBuildオプションのBuild SystemをGradleにする
 
AndroidのBuildオプションのBuild SystemをGradleにする
  
 
参考:https://documentation.onesignal.com/docs/troubleshooting-unity
 
参考:https://documentation.onesignal.com/docs/troubleshooting-unity
 +
 +
==NDK is missing a "platforms" directory.エラーのとき==
 +
詳細エラー:
 +
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
 +
 +
SDKManagerから"sdk tools"タブをクリックし、NDKをインストールする
 +
 +
=="デバッグを無効にする必要"とでる場合==
 +
以下エラーの場合
 +
アップロードできませんでした
 +
デバッグ可能な APK または Android App Bundle をアップロードしました。セキュリティ上の理由により、Google Play に公開するにはデバッグを無効にする必要があります。詳しくは、デバッグ可能な APK または Android App Bundle についての説明をご覧ください。
 +
Build Setting/Development Buildをoffにする

2020年4月6日 (月) 05:16時点における版

Androidを公開する

以下を参考に実機で動かせるようにする

unity/実機/Android [ショートカット]

  1. File/BuildSettingsを選択
  2. Androidを選択
  3. PlayerSettingsを選択
  4. Inspector/端末マーク/PublisingSetting
  5. "Create〜"を選択しKeystoreを作成
  6. "Use a〜"を選択Keystoreのパスを入力する
  7. Buildするとapkができるのでそのままplay.consoleへ登録する

UnityException: Can not sign the application Unable to sign the application; please provide passwords!エラーが出る場合

keystoreのパスが空欄など


UnityEditor.BuildPlayerWindow+BuildMethodException: Build failed with errors.エラーが出る場合

  • sdkのpathに日本語が入ってる
  • playから公開用apkを既にインストールしており、updateに失敗する(この場合は端末に入ってるアプリを消せば良い)

Please set the Bundle Identifier in the Player Settings. The value must follow the convention 'com.YourCompanyName.YourProductName' and can contain alphanumeric characters and underscore. Each segment must not start with a numeric character or underscore.のエラーが出るとき

Bundle Identifierに"-"などが含まれていると上記エラーとなる

Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for details.のエラーが出るとき

http://dl.google.com/android/repository/tools_r22.0.5-macosx.zip 少し古いtoolsをdlしてsdkの下のtoolsを更新する

参考:http://nn-hokuson.hatenablog.com/entry/2017/09/05/202327

trouble writing output: Too many field references to fit in one dex file: 71337; max is 65536. You may try using multi-dex. If multi-dex is enabled then the list of classes for the main dex list is too large.エラーのとき

AndroidのBuildオプションのBuild SystemをGradleにする

参考:https://documentation.onesignal.com/docs/troubleshooting-unity

NDK is missing a "platforms" directory.エラーのとき

詳細エラー: If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

SDKManagerから"sdk tools"タブをクリックし、NDKをインストールする

"デバッグを無効にする必要"とでる場合

以下エラーの場合

アップロードできませんでした
デバッグ可能な APK または Android App Bundle をアップロードしました。セキュリティ上の理由により、Google Play に公開するにはデバッグを無効にする必要があります。詳しくは、デバッグ可能な APK または Android App Bundle についての説明をご覧ください。

Build Setting/Development Buildをoffにする