Posts

Showing posts from September, 2014

android Warning: xxx can't find referenced field 'int xxx' in class xxx.R$id

1.error [2014-09-25 14:59:44 - pkrssv4] ------------------------------ [2014-09-25 14:59:44 - pkrssv4] Android Launch! [2014-09-25 14:59:44 - pkrssv4] adb is running normally. [2014-09-25 14:59:44 - pkrssv4] Performing com.pkrss.MainActivity activity launch [2014-09-25 15:03:19 - pkrssv4] Launching a new emulator with Virtual Device '320_480_19' [2014-09-25 15:04:07 - pkrssv4] New emulator found: emulator-5554 [2014-09-25 15:04:07 - pkrssv4] Waiting for HOME ( 'android.process.acore' ) to be launched... [2014-09-25 15:05:08 - pkrssv4] HOME is up on device 'emulator-5554' [2014-09-25 15:05:08 - pkrssv4] Uploading pkrssv4.apk onto device 'emulator-5554' [2014-09-25 15:05:20 - pkrssv4] Installing pkrssv4.apk... [2014-09-25 15:06:21 - pkrssv4] Success! [2014-09-25 15:06:21 - webview_google] Could not find webview_google.apk! [2014-09-25 15:06:21 - pkrssv4] Starting activity com.pkrss.MainActivity on device emulator-5554 [2014-09-25 15:06:24 - pkrssv4] ...

#1215 - Cannot add foreign key constraint

1.error #1215 - Cannot add foreign key constraint 2.old sql: CREATE TABLE IF NOT EXISTS `pkrss_rssitem_l1` ( `id` int (11) NOT NULL AUTO_INCREMENT, `tid` int (11) NOT NULL, `cid` int (11) NOT NULL COMMENT 'pkrss_rsscatalog.id' , `lid` int (11) NOT NULL COMMENT 'pkrss_rsslocale.id' , `item_pubdate` datetime DEFAULT NULL, `item_title` varchar(127) COLLATE utf8_bin NOT NULL, `item_desc` varchar(246) COLLATE utf8_bin NOT NULL, `item_link` varchar(246) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, `item_authors` varchar(64) COLLATE utf8_bin NOT NULL, PRIMARY KEY (`id`), KEY `item_pubdate` (`item_pubdate`), CONSTRAINT fk_PerItems_l1 FOREIGN KEY (tid) REFERENCES pkrss_rsstable(id) on DELETE cascade ON update cascade ) DEFAULT CHARSET=utf8 COLLATE=utf8_bin 3.new sql CREATE TABLE IF NOT EXISTS `pkrss_rssitem_l1` ( `id` int (11) NOT NULL AUTO_INCREMENT, `tid` int (11) NOT NULL, `cid` int (11) NOT NULL COMMENT 'pkrss_rsscatalog.id' , `lid` int (11) NOT NULL COMMENT ...

Missing metadata tag with the name "com.google.android.gms.appstate.APP_ID" in the application tag of the manifest

1.error 09-11 22:37:45.919: E/ValidateServiceOp(5619): Missing metadata tag with the name "com.google.android.gms.appstate.APP_ID" in the application tag of the manifest for com.pkrss.snake fixed: moidfy AndroidManifest.xml: <meta-data android:name= "com.google.android.gms.games.APP_ID" android: value = "@string/app_id" /> <meta-data android:name= "com.google.android.gms.appstate.APP_ID" android: value = "@string/app_id" />

android maven error log:Could not find tool 'dx.jar' and Could not find tool 'aapt'

Image
1.error [ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.3:dex ( default -dex) on project gauges-android: Execution default -dex of goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.3:dex failed: Could not find tool 'dx.jar' . Please provide a proper Android SDK directory path as configuration parameter <sdk><path>...</path></sdk> in the plugin <configuration/>. As an alternative, you may add the parameter to commandline: -Dandroid.sdk.path=... or set environment variable ANDROID_HOME. -> [Help 1] fixed   reinstall  Android sdk plateform-tools,checked it,ok,checked it,ok. then clean project,reopen eclipse. if error not fixed,then copy folder android sdk\build-tools\android-x.x\lib to android sdk\platform-tools\lib 2.error [ERROR] Failed to execute goal com.jayway.maven.plugins.android.generation2:android-maven-plugin:3.5.3:generate-sources ( default -generate-sourc...

[ERROR] E:\Program Files\Java\jre8\..\lib\tools.jar

Image
1.error [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile ( default -compile) on project gauges-android: Compilation failure [ERROR] Unable to locate the Javac Compiler in : [ERROR] E:\Program Files\Java\jre8\..\lib\tools.jar [ERROR] Please ensure you are using JDK 1.4 or above and [ERROR] not a JRE (the com.sun.tools.javac.Main class is required). [ERROR] In most cases you can change the location of your Java [ERROR] installation by setting the JAVA_HOME environment variable. [ERROR] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch . [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException fixed 1: eclipse –> windows –> Preferences, selected Installed Jres, click ...

windows + android + eclipse + maven + maven android plugin

1.install prepare android sdk + eclipse 2.install apache maven download from apache maven download , extract it, and add the bin/ directory to your system path variable. 3.install maven plugin in eclipse plugin eclipse –> help –> install new software, then input maven,select ok in next steps. 4.download android maven plugin code > git clone https://github.com/jayway/mav en-android-plugin.git > cd maven-android-plugin in first time > mvn clean install or on error,then conintue run: > mvn install

android ids.xml not translate error

1.error when used android google play game sdk,add ids.xml to res/,then get bellow error message: Description Resource Path Location Type "app_id" is not translated in "af" (Afrikaans), "ar" (Arabic), "az" (Azerbaijani), "be" (Belarusian), "bg" (Bulgarian), "bn" (Bengali), "bs" (Bosnian), "ca" (Catalan), "cs" (Czech), "cy" (Welsh), "da" (Danish), "de" (German), "el" (Greek), "eo" (Esperanto), "es" (Spanish), "es-rUS" (Spanish: United States), "et" (Estonian), "eu" (Basque), "fa" (Persian), "fi" (Finnish), "fr" (French), "ga" (Irish), "gl" (Galician), "gu" (Gujarati), "ha" (Hausa), "hi" (Hindi), "hr" (Croatian), "ht" (Haitian), "hu" (Hungarian),...

09-07 23:12:19.520: E/GamesNativeSDK(5012): Exception in dalvik/system/DexClassLoader.loadClass: java.lang.ClassNotFoundException: com.google.android.gms.games.NativeSdkCallbacks.

1.i used cocos2d-x 3.0 and google play game sdk c++, after with office step,i get bellow error. error 09-07 23:12:19.170: E/GamesNativeSDK(5012): Can 't register class com/google/android/gms/games/PlayerLevel: an exception occurred. 09-07 23:12:19.170: E/GamesNativeSDK(5012): Can' t register class com/google/android/gms/games/PlayerLevelInfo: an exception occurred. 09-07 23:12:19.180: E/GamesNativeSDK(5012): Can 't register class com/google/android/gms/games/event/Event: an exception occurred. 09-07 23:12:19.180: E/GamesNativeSDK(5012): Can' t register class com/google/android/gms/games/ event /EventBuffer: an exception occurred. 09-07 23:12:19.180: E/GamesNativeSDK(5012): Can 't register class com/google/android/gms/games/event/Events: an exception occurred. 09-07 23:12:19.180: E/GamesNativeSDK(5012): Can' t register class com/google/android/gms/games/ event /Events$LoadEventsResult: an exception occurred. 09-07 23:12:19.230: E/GamesNativeSDK(5012): Can ...

Android requires compiler compliance level 5.0 or 6.0. Found '1.4' instead. Please use Android Tools > Fix Project Properties.

1.error [2014-09-08 09:45:04 - google-play-services_lib] Android requires compiler compliance level 5.0 or 6.0. Found '1.4' instead. Please use Android Tools > Fix Project Properties. 2.fixed   1 Project Right -> android tools -> Fix Project 2 If not, check the Project -> Properties-> Java Compiler      Confirm JDK compliance is set to 1.6, and enable specific seetings.

cocos2d-x 3.0 parse xml used tinyxml

1.bellows is cocos2d-x 3.0 parse xml from file code,because i writed some error parse code,and fixed it. bool RuntimeProfile::init(){ reset(); std:: string currentLanguageCode = Application::getInstance()->getCurrentLanguageCode(); if (currentLanguageCode == "zh" ) currentLanguageCode = "values-zh-rCN" ; unsigned char * buf = 0; do { if (currentLanguageCode.empty()) break ; try { std:: string file_path = FileUtils::getInstance()->fullPathForFilename( "locales/" + currentLanguageCode + "/strings.xml" ); if (!FileUtils::getInstance()->isFileExist(file_path)) break ; ssize_t size; buf = FileUtils::getInstance()->getFileData(file_path, "r" , &size); if (!buf) break ; tinyxml2::XMLDocument* myDocment = new tinyxml2::XMLDocument(); if (tinyxml2::...

2014年8月青奥会闭幕式 青奥会激光笔照射事件

(有人乱删贴,我来贴原文,留给以后看) 在2014年8月青奥会闭幕式上,出现了令人遗憾的场景:总理,国际奥委会主席巴赫,国旗护卫队队员和演出人员,都被韩国人激光队照射眼睛。但是奇怪的是,今天所有报道此事的媒体网页都被删除,各大论坛也是一样,不知道组委会什么想法,圣母心态?大国情怀?必须转起来,让更多的人认清棒子的丑恶嘴脸!!! 青奥会闭幕式晚上下大雨,武警在外面站岗两个多小时,演出人员冒雨演出,安保人员许多从早上四点多开始工作,成功举办了第二届青年奥运会,中间发生了一段不和谐的插曲,李维亚导演再三恳求观众不要用激光笔去照射感光地面,因为会破坏直播效果,属于重大演出失误,再三陈述不许使用,但有一位观众不怀好意,在切总理画面时候用激光笔照射总理,造成恶劣影响,该观众一而再再而三搞破坏,照射总理,巴赫主席,照射国旗护卫队队员的眼睛,照射演出人员的眼睛。 转自网络。