nirasan's tech blog

趣味や仕事の覚え書きです。Linux, Perl, PHP, Ruby, Javascript, Android, Cocos2d-x, Unity などに興味があります。

Unity で Android のビルドができない問題2件

はじめに

  • Google Play Games パッケージのインストール後に発生?

1件目

エラーメッセージ

Error building Player: Win32Exception: ApplicationName='/PATH/TO/ADT/adt-bundle-mac-x86_64-20131030/sdk/tools/zipalign', CommandLine='4 "/PATH/TO/PROJECT/Temp/StagingArea/Package_unaligned.apk" "/PATH/TO/PROJECT/Temp/StagingArea/Package.apk"', CurrentDirectory='Temp/StagingArea'

対策

ln -s /FULL/PATH/TO/SDK/build-tools/20.0.0/zipalign /FULL/PATH/TO/SDK/tools

2件目

エラーメッセージ

Error building Player: CommandInvokationFailure: Unable to retrieve device properties. Please make sure the Android SDK is installed and is properly configured in the Editor. See the Console for more details. 
/PATH/TO/ADT/adt-bundle-mac-x86_64-20131030/sdk/platform-tools/adb -s HT339S801675 shell getprop

stderr[
error: device offline
error: device offline
]
stdout[

]

対策

  • adb を kill してビルドの再実行
ps axuw | grep adb
kill PROCESS_NUMBER