Precautions for code obfuscation of the Android project's external AMAP, android AMAP
Currently, third-party jar packages have been added to many projects, but the biggest problem is code obfuscation error during packaging. The following is a solution for AMAP obfuscation error:
Add the following code to proguard-project.txt:
-Libraryjars libs/android-support-v4.jar
-Dontwarn android. support. v4 .**
-Keep class android. support. v4 .**{*;}
-Keep interface android. support. v4.app .**{*;}
-Keep public class * extends android. support. v4 .**
-Keep public class * extends android. app. Fragment
# The third-party jar package in the libs folder. Note the name.
-Libraryjars libs/Android_Location_V1.1.0.jar
-Libraryjars libs/Android_Map_2.2.0.jar
-Dontwarn com. amap. api .**
-Dontwarn com. a. .**
-Dontwarn com. autonavi .**
-Keep class com. amap. api .**{*;}
-Keep class com. autonavi .**{*;}
-Keep class com. a. .**{*;}
Add in project. properties
Proguard. config =$ {sdk. dir}/tools/proguard/proguard-android.txt: proguard-project.txt
If you have any questions, please leave a message and repeat the source.
Use AMAP in android to obtain latitude and longitude through address
You can locate it directly in the gps Engineering Test Mode to obtain the longitude and latitude and the height of your location. You can also use navigation software such as Kay lide.
Android AMAP positioning Demo kneeling, in a hurry
Uploaded!