Error in SDKInitializer. initialize (getApplicationContext () debugging by Baidu map SDK, applicationcontext

Source: Internet
Author: User

Error in SDKInitializer. initialize (getApplicationContext () debugging by Baidu map SDK, applicationcontext

First, describe the cause of the problem. At the beginning, I wrote a demo of Baidu map SDK to test the function, because at first I used the AVD provided by Eclipse for debugging, and everything was normal. It can be verified normally, but the AVD device cannot be restarted repeatedly, and Genymotion is a very popular simulator to replace debugging.

You know a lot about Genymotion. However, some problems may occur during the installation, and we will try again later.

After debugging the normal engineering code at the beginning, the result was changed to the simulator and it was not enough. However, due to a problem in installing Genymotion in the middle, I was a bit skeptical that the Eclipse environment was faulty, helpless .. It's crazy .. In the end, I decisively reinstalled Eclipse and wasted a lot of time on it.

After the final installation, install Genymotion's Eclipse plug-in. This is the same as before. It gets stuck during online installation and remains unchanged for a long time.

It is stuck on this always-connected interface. After finding a solution for a long time, I found a solution. After checking and canceling the following Contact all update sites during install to find required software check box, quickly started, and soon completed the plug-in installation. This method is used for online installation. In addition, this problem also occurs when ADT is installed locally. In the end, the problem is fixed after network disconnection. In short, Genymotion is very good after installation, and the speed is very fast and smooth.

But soon another problem came, that is, SDKInitializer when debugging the Baidu map demo. initialize (getApplicationContext (); this statement always reports an error. In any case, add AndroidManifest. the permissions in xml cannot be changed to getApplicationContext () or getApplication (). Finally, I found a reliable solution for a long time, the reason is that the simulator lacks support for the arm architecture.

After Genymotion is installed and Android Application is deployed for debugging, the console reports the following error: Installation error: INSTALL_FAILED_CPU_ABI_INCOMPATIBLE, this is because the system lacks the Google Play market and other Google service applications. In fact, due to copyright issues, all the Virtual Devices provided by Genymotion since version 2.0 have removed Google Apps and ARM library support, therefore, if the Virtual Machine downloaded from the software runs some apps that must rely on these components, errors or flashback may occur.

The solution is to download the arm support components and drag them to the virtual machine created by Genymotion. Click OK to restart and debug the tool properly.

: Http://download.csdn.net/detail/zhanghaofor/8765301

The last two images can be debugged normally.

Related Article

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.