The difference between armeabi and armeabi-v7a in the libs folder of Android causes the problem that the positioning of Baidu map does not execute the positioning callback function.
Regarding the second problem encountered during development, I said that it was in a numb state. I am referring to the problem because it has plagued me for at least two days, after I find the cause of the failure, I am numb and have no sense of attention to Solve the Problem ~~~~~~~~~~~~~~
Let's go back to the text. I am developing a project that involves positioning. When I wrote the positioning demo separately, it was completely normal and I thought, drag the code block directly into the project and it will be OK (of course, it is to apply for a new Baidu mapkey for the Project). I did this two days ago, however, the map can be displayed normally without achieving the desired effect. As a result, I began to explore the solution from mainfest. the xml configuration starts to check whether any service is enabled and whether the permission has been fully added ~~~~~~~~~ But as you know, none of these are! The process of finding the problem in the middle is too embarrassing, because it can run normally in the original demo, but it is just a change of location. Why can't it run, I really couldn't find the reason. I still couldn't find any questions from various forums. It just took two days. This afternoon, when I plan to continue to struggle at night, finally, I carefully looked at logcat and found the cause of the problem,
Below are some of the abnormal prints that I have been ignoring:
The originally located. So file was not loaded successfully. How can I execute the positioning callback function public class mylocationlistener implements bdlocationlistener {~~~~~~~} What about ???
But why is it not executed? All the configurations have been completed, and the service has also been declared ???
Then I can only view the storage location of the. So file in libs. After carefully reading the result, I found that the libs folder of the original demo project is like this:
There is only one armeabi sub-folder, and all the. So files are put in it, but I have read the libs folder in the project as follows:
The only error is located here: the. So file has an error !!!! And my cell phone CPU does not match, so can not read the location of the. So file, next talk about armeabi, armeabi-a7v, x86, MIPS
The relationships and differences between these folders: Convert (http://blog.csdn.net/duqiuke/article/details/8183549)
Arm is a well-known enterprise in the microprocessor industry. It has designed a large number of high-performance, low-cost, and low-energy-consuming Proteus processors, related technologies and software. The technology features high performance, low cost, and low energy consumption. It is applicable to multiple fields, such as embedded control, consumption/education multimedia, DSP, and mobile applications.
What is Eabi?
Embedded Application binary interface (Embedded Application binary Interface) describes the connection, execution, and debugging of the target code, library target code, executable file images, and how to connect, execute, and debug the target code generation process, and C, C ++ language interfaces are the basic specification for compiling connection tools and the basis for studying their working principles. Unfortunately, arm's Eabi has not been fully set so far. As part of Eabi, there are process calling specifications, executable file format specifications, C/C ++ Abi specifications, and debugging format specifications. This is a new method of calling the system.
There is a libs folder in the root directory of our android APK, which contains two folders: armeabi and armeabi-v7a. Our C code is compiled into a local library (various. so) will be placed in one of the two folders. What is the difference between armeabi-v7a and armeabi?
Armeabi and armeabi-v7a is the type of CPU, we know that the general phone or tablet is using arm cpu (MIPs is sad reminder is ignored), different CPU features are not the same, armeabi is for general or old arm CPUs and armeabi-v7a for ARM CPUs with floating point operations or advanced extensions.
You can configure the following Macros in Android. mk:
Target_cpu_api: = armeabi
App_abi: = armeabi
When you encounter undefine errors that link to the dynamic library during compilation, or when your APK runs with an error of loading. So dynamic library, check whether the configuration of this CPU type is correct.
Here also introduced the relevant information: http://www.th7.cn/Program/Android/201304/134297.shtml
In short, the problem was solved in the above way. After two days of struggle, the problem was put down!
Problems encountered during Baidu map Development (2)