GPS Application debugging Recently when debugging GPS applications on the AVD, get location information, but often in debug loc is null, because first need to manually add GPS information in the AVD, there are two ways to manually add 1, under Eclipse, Windows-->open perspective-->ddms-->emulator control-->manual manually set the latitude and longitude, and press the Send button. 2. Manually add the information under CMD. (1) First open the emulator, and then run cmd, input telnet localhost 5554 (note: 5554 is the emulator on the port of the machine, the specific port number emulator is shown on the top left), this will appear Android console:type ' help ' for a list of commandsthe word "OK".
If you are using WIN7 's friends, the console may prompt for Telnet invalid, that is because the default is WIN7 under Telnet, need to open manually. Specifically: [1] Control Panel----turn Windows features on or off, and then tick the Telnet server and Telnet client. [2] Then manually start Telnet in the Administration tools--services (2) Use the GEO command to simulate sending GPS signals: Geo fix longitude latitude
(3) It will be found in the emulator's status bar more than a GPS logo, this time you can debug the normal
Acquisition of Android system time
*******************************
Applying Debug errors Log as follows, Java.lang.RuntimeException:Unable to instantiate activity componentinfo{com.xxx.xxx/com.xxx.xxx. Mainactivity}: Java.lang.ClassNotFoundException:Didn ' t find Class "com.xxx.xxx.MainActivity" on path:dexpathlist[[ Zip file "/data/app/xxx.xxx.bgr-1.apk"],nativelibrarydirectories=[/data/app-lib/com.xxx.bgr-1,/vendor/lib,/ System/lib]]
Fortunately, the change is not much to find this problem, carefully examined the next, because you want to change the registration, So only in the androidmanifest.xml to change the name of the package, and finally carefully read the next designated mainactivity the path of the line because the registration changed so has been unable to load to mainactivity so error. That's why I do, but probably similar questions may be related to changing the name of the package.
On the Android system time acquisition, you can look at this blog, or more detailed. http://blog.csdn.net/zhanghaofor/article/details/46300649 |