TapTapTap!!!(17)~Google Play Services のインポート方法~
TapTapTap!!!(16)~Google Play Services がインポートできない~では Google Play 上で実績およびランキング機能を実装するためにGoogle Play Servicesをインポートしようと思ったがエラーになったことを報告した。今回はその解決策が見つかったため報告する。
PC環境は以下の通り。
OS:Windows7 Home Premium(64ビット)
CPU:Intel(R) Core(TM) i7-4790 CPU @ 3.60GHz (8GB)
Unity:5.6.3p2
解決方法はこちら
表示されたエラー内容
System.IO.DirectoryNotFoundException: Directory 'Assets/Plugins/Android' not found. at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) [0x000f7] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:514 at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:275 at System.IO.Directory.GetDirectories (System.String path) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:270 at GooglePlayGames.Editor.GPGSUpgrader.CleanDuplicates (System.String root) [0x00002] in C:UsersFavioraDocumentsunity_workTapTapTap!!AssetsGooglePlayGamesEditorGPGSUpgrader.cs:124 at GooglePlayGames.Editor.GPGSUpgrader..cctor () [0x0013d] in C:UsersFavioraDocumentsunity_workTapTapTap!!AssetsGooglePlayGamesEditorGPGSUpgrader.cs:92 UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes() System.IO.DirectoryNotFoundException: Directory 'Assets/Plugins/Android' not found. at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) [0x000f7] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:514 at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:275 at System.IO.Directory.GetDirectories (System.String path) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:270 at GooglePlayGames.Editor.GPGSUpgrader.CleanDuplicates (System.String root) [0x00002] in C:UsersFavioraDocumentsunity_workTapTapTap!!AssetsGooglePlayGamesEditorGPGSUpgrader.cs:124 at GooglePlayGames.Editor.GPGSUpgrader..cctor () [0x0013d] in C:UsersFavioraDocumentsunity_workTapTapTap!!AssetsGooglePlayGamesEditorGPGSUpgrader.cs:92 UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes() System.IO.DirectoryNotFoundException: Directory 'Assets/Plugins/Android' not found. at System.IO.Directory.GetFileSystemEntries (System.String path, System.String searchPattern, FileAttributes mask, FileAttributes attrs) [0x000f7] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:514 at System.IO.Directory.GetDirectories (System.String path, System.String searchPattern) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:275 at System.IO.Directory.GetDirectories (System.String path) [0x00000] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.IO/Directory.cs:270 at GooglePlayGames.Editor.GPGSUpgrader.CleanDuplicates (System.String root) [0x00002] in C:UsersFavioraDocumentsunity_workTapTapTap!!AssetsGooglePlayGamesEditorGPGSUpgrader.cs:124 at GooglePlayGames.Editor.GPGSUpgrader..cctor () [0x0013d] in C:UsersFavioraDocumentsunity_workTapTapTap!!AssetsGooglePlayGamesEditorGPGSUpgrader.cs:92 UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()
念の為、画像では以下の通り。
エラーの解決方法を示していく。
1.「GooglePlayGames」と「PlayServicesResolver」の削除する
[Project] タブ内の「GooglePlayGames」と「PlayServicesResolver」を削除する。
2.「GooglePlayGamesPlugin-0.9.50.unitypackage」を再度インポートする
インポートの方法についはTapTapTap!!!(16)~Google Play Services がインポートできない~で記載しているため省略する。
3.原因
「GooglePlayGamesPlugin-0.9.50.unitypackage」インポート時に[Project]タグ内に[Plugins] > [Android] のフォルダがなかったことが原因。エラーログにもしっかり書いてあったので、エラーはよく読みましょうということで一つ。