Recent summary--android system time acquisition and AVD simulation GPS related debugging

Source: Internet
Author: User

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

Recent summary--android system time acquisition and AVD simulation GPS related debugging

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.