Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed resolution of: Landroid/support/v4/util/ArrayMap; #17

Closed
grapefrukt opened this issue Nov 30, 2015 · 5 comments
Closed

Failed resolution of: Landroid/support/v4/util/ArrayMap; #17

grapefrukt opened this issue Nov 30, 2015 · 5 comments

Comments

@grapefrukt
Copy link

I'm getting this crash as soon as I call extension.gpg.GooglePlayGames.init(false), everything was working previous to upgrading to the latest Android Support Library (23.1.1) and Google Play Services (28).

I'm looking into reverting these upgrades now, but this seems like a problem that will need dealing with eventually.

11-30 16:05:47.618   878   878 E AndroidRuntime: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/ArrayMap;
11-30 16:05:47.618   878   878 E AndroidRuntime:        at com.google.android.gms.common.api.GoogleApiClient$Builder.<init>(Unknown Source)
11-30 16:05:47.618   878   878 E AndroidRuntime:        at com.google.android.gms.common.api.GoogleApiClient$Builder.<init>(Unknown Source)
11-30 16:05:47.618   878   878 E AndroidRuntime:        at com.gpgex.GameHelper.createApiClientBuilder(GameHelper.java:238)
11-30 16:05:47.618   878   878 E AndroidRuntime:        at com.gpgex.GameHelper.setup(GameHelper.java:278)
11-30 16:05:47.618   878   878 E AndroidRuntime:        at com.gpgex.GooglePlayGames$1.run(GooglePlayGames.java:56)
11-30 16:05:47.618   878   878 E AndroidRuntime:        at android.os.Handler.handleCallback(Handler.java:739)
11-30 16:05:47.618   878   878 E AndroidRuntime:        at android.os.Handler.dispatchMessage(Handler.java:95)
11-30 16:05:47.618   878   878 E AndroidRuntime:        at android.os.Looper.loop(Looper.java:148)
11-30 16:05:47.618   878   878 E AndroidRuntime:        at android.app.ActivityThread.main(ActivityThread.java:5417)
11-30 16:05:47.618   878   878 E AndroidRuntime:        at java.lang.reflect.Method.invoke(Native Method)
11-30 16:05:47.618   878   878 E AndroidRuntime:        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
11-30 16:05:47.618   878   878 E AndroidRuntime:        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
11-30 16:05:47.618   878   878 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.ArrayMap" on path: DexPathList[[zip file "/data/app/com.grapefrukt.games.twofold-1/base.apk"],nativeLibraryDirectories=[/data/app/com.grapefrukt.games.twofold-1/lib/arm, /data/app/com.grapefrukt.games.twofold-1/base.apk!/lib/armeabi, /vendor/lib, /system/lib]]
11-30 16:05:47.618   878   878 E AndroidRuntime:        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
11-30 16:05:47.618   878   878 E AndroidRuntime:        at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
11-30 16:05:47.618   878   878 E AndroidRuntime:        at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
11-30 16:05:47.618   878   878 E AndroidRuntime:        ... 12 more
11-30 16:05:47.618   878   878 E AndroidRuntime:        Suppressed: java.lang.ClassNotFoundException: android.support.v4.util.ArrayMap
11-30 16:05:47.618   878   878 E AndroidRuntime:                at java.lang.Class.classForName(Native Method)
11-30 16:05:47.618   878   878 E AndroidRuntime:                at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
11-30 16:05:47.618   878   878 E AndroidRuntime:                at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
11-30 16:05:47.618   878   878 E AndroidRuntime:                at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
11-30 16:05:47.618   878   878 E AndroidRuntime:                ... 13 more
11-30 16:05:47.618   878   878 E AndroidRuntime:        Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available
@grapefrukt
Copy link
Author

This error was encountered using haxe 3.2.0, openfl 3.4.0 and lime 2.7.0.

@grapefrukt
Copy link
Author

Turns out that manually copying android-support-v4.jar into bin\android\bin\deps\gpgex\libs (where bin is my build folder) does resolve this issue, so it shouldn't be a huge problem to fix.

I am, however not familiar enough with the android build system to know where to add this.

@fbricker
Copy link
Contributor

Hi, you don't need to copy anything. Thing is: To use google play games (you need to have google-play-services_lib and android-support-v4) downloaded into your android SDK Folder (using the android sdk manager) - please read: https://github.com/SempaiGames/extension-googleplaygames/blob/master/README.md#how-to-install

Also, you need to upgrade to the last versions of extension-googleplaygames, extension-googleplayservices-lib and extension-android-support-v4 on haxe (this should be done automatically but running haxelib upgrade).

One thing: I've added missing dependency on this extension (so upgrading the extension may fix your issue right away).

Anyway, having to download this files from the android SDK manager is not something we can fix, as there's something that according to google terms and conditions every developer must do on it's own (really annoying). That's why we cannot include the required JARs from google directly on the extensions (Bad dog Google! bad dog! 👎 )

PS: I think in the future we'll be able to check if those files are already downloaded so we can raise an error in case they're missing telling people exactly what to do 👍 (I'll insist Joshua on that).

Thanks!

@grapefrukt
Copy link
Author

I'm sorry! I didn't see the android-support-v4 dependency, I guess I got confused since I had it working and then broke it. Thanks!

@fbricker
Copy link
Contributor

fbricker commented Dec 4, 2015

Not your fault :P android-support-v4 was silently added as a dependency few weeks ago by google.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants