Androidでテスト…
先日ハマった AndroidManifest.xml … もう完璧に回避だぜっ☆
… で サクッと確認して次へ行く予定が…
[2014-08-23 00:04:36 - Dex Loader] Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace. [2014-08-23 00:04:36 - sample] Conversion to Dalvik format failed: Unable to execute dex: java.nio.BufferOverflowException. Check the Eclipse log for stack trace.
…いや…意味分からない…何コレ…^^;
Androidはプログラムの手前で詰まるので…凹むことがあまりにも大杉…orz
…結局 プロジェクのプロパティを開き、「Build Target Version」を新しいバージョンを選択して問題回避出来ました。
…ホント分からない…
…こういう基本的なところも多々知らない事ばかりだけど…まぁ少しずつ経験するしかないのかな… ^^;
肝心の解像度の方は… OS別(iOS or Android)で処理しました ^^;
まぁとりあえず、しばらくこんな感じでやってみよう ^^;
{ auto target = Application::getInstance()->getTargetPlatform(); auto fileUtils = FileUtils::getInstance(); auto screenSize = glview->getFrameSize(); std::vector<std::string> resDirOrders; switch (target) { case (Platform::OS_IPAD): case (Platform::OS_IPHONE): { { //iPad Retina if ((2048 == screenSize.width) || (2048 == screenSize.height)) { resDirOrders.push_back("ipadhd"); //glview->setDesignResolutionSize(2048, 1536, ResolutionPolicy::SHOW_ALL); //glview->setDesignResolutionSize(1024, 768, ResolutionPolicy::SHOW_ALL); glview->setDesignResolutionSize(512, 384, ResolutionPolicy::SHOW_ALL); director->setContentScaleFactor(4.0f); } //iPad UnRetina else if ((1024 == screenSize.width) || (1024 == screenSize.height)) { resDirOrders.push_back("ipad"); //glview->setDesignResolutionSize(1024, 768, ResolutionPolicy::SHOW_ALL); glview->setDesignResolutionSize(512, 384, ResolutionPolicy::SHOW_ALL); director->setContentScaleFactor(2.0f); } //iPhone 4inch (Retina) else if ((1136 == screenSize.width) || (1136 == screenSize.height)) { resDirOrders.push_back("iphonehd"); //glview->setDesignResolutionSize(1156, 640, ResolutionPolicy::SHOW_ALL); glview->setDesignResolutionSize(568, 320, ResolutionPolicy::SHOW_ALL); //director->setContentScaleFactor(2.0f); } //iPhone 3.5inch (Retina) else if ((960 == screenSize.width) || (960 == screenSize.height)) { resDirOrders.push_back("iphonehd"); //glview->setDesignResolutionSize(960, 640, ResolutionPolicy::SHOW_ALL); glview->setDesignResolutionSize(480, 320, ResolutionPolicy::SHOW_ALL); //director->setContentScaleFactor(2.0f); } //MARK: iPhone(非Retina) 切り捨て? // else // { // resDirOrders.push_back("iphone"); // // glview->setDesignResolutionSize(480, 320, ResolutionPolicy::SHOW_ALL); // } fileUtils->setSearchPaths(resDirOrders); } break; } default: case (Platform::OS_ANDROID): { //480x320 固定 { { resDirOrders.push_back("iphonehd"); //glview->setDesignResolutionSize(960, 640, ResolutionPolicy::SHOW_ALL); glview->setDesignResolutionSize(480, 320, ResolutionPolicy::SHOW_ALL); //director->setContentScaleFactor(2.0f); } fileUtils->setSearchPaths(resDirOrders); } break; } } }