Cannot run the application with maps on an Android device running 4.0.3 ICS

Well, just finished the application with some basic functionality. It was checked through several sdk to ensure proper execution and support.

It was found that it will not run on the tablet that I have, which works on Android 4.0.3 ICS . (Note: Standard MAPS and NAVIGATION applications work fine.)

Performing the same action for the emulator will not lead to any exceptions and works fine. After trying Google, I found that the exception : java.lang.NoClassDefFoundError: android.security.MessageDigest is caused by some compatibility / incorrect firmware compatibility with the Google MAPS API / SDK.

Some other people suggest using java.security.MessageDigest , but in this case we will not be able to edit com.google.maps.jar ourselves. Can you offer a job or some kind of trick to make sure that it works on Android 4.0.3 ICS devices.

+8
android google-maps
source share
2 answers

Found a job. One thing was sure that on a device running Android 4.0.3 ICS there was a problem with the Google Maps API. So Google tried for any libraries specific to Android 4.0.3 ICS. Found it gapps-ics-20120429-signed.zip [mediafire.com/?owj7hj310var5rq]. Loaded and connected by the device to the computer. Used to install library 1. adb remount 2. adb push system / etc / permissions / com.google.android.maps.xml / system / etc / permissions 3. adb push system / framework / com.google.android.maps.jar / system / framework 4. Rebooting adb, there is everything to work fine. Hope this helps

0
source share

I have been behind this for a long time. And managed to fix it. I would like to explain the problem here and the simplest workaround.

ERROR HERE ...

The error is the result of making a device or ROM creator using an older map library with a new version of Android. It is usually isolated from obscure pills, but theoretically it may appear in other situations. ( here)

android.security.MessageDigest was removed in Honeycomb and later. This is what causes the problems.

EASY CORRECTION FROM YOUR CODE:

Just create MessageDigest.java in the src directory in the android \ security package and enter the code below inside.

This workaround really works and is the most non-intrusive I've found. I have not seen any side effects.

 package android.security; import java.security.NoSuchAlgorithmException; public class MessageDigest { private java.security.MessageDigest instance; public MessageDigest() {} private MessageDigest(java.security.MessageDigest instance) { this.instance = instance; } public static MessageDigest getInstance(String algorithm) throws NoSuchAlgorithmException { if (algorithm == null) return null; try { if (algorithm.equals("SHA-1")) return (MessageDigest) Class.forName("android.security.Sha1MessageDigest").newInstance(); else if (algorithm.equals("MD5")) return (MessageDigest) Class.forName("android.security.Md5MessageDigest").newInstance(); } catch (Exception e) {} return new MessageDigest(java.security.MessageDigest.getInstance(algorithm)); } public void update(byte[] input) { instance.update(input); } public byte[] digest() { return instance.digest(); } public byte[] digest(byte[] input) { return instance.digest(input); } } 
0
source share

All Articles