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

Didn't find class "android.support.v4.util.ArrayMap" #32

Open
Txori opened this issue Apr 30, 2017 · 6 comments
Open

Didn't find class "android.support.v4.util.ArrayMap" #32

Txori opened this issue Apr 30, 2017 · 6 comments

Comments

@Txori
Copy link

Txori commented Apr 30, 2017

Hi @fbricker, I'm trying to run your lib for days now... So I tried to compile @mgalpy strip down example (#26 (comment)), without luck.

Here's my system setup:

actuate: [1.8.7]
box2d: [1.2.3]
extension-android-support-v4: [1.0.0]
extension-googleplaygames: [1.5.7]
extension-googleplayservices-basement: [1.1.0]
extension-share: [2.4.3]
flixel-addons: git [dev:/usr/lib/haxe/lib/flixel-addons/git]
flixel-ui: git [dev:/usr/lib/haxe/lib/flixel-ui/git]
flixel: git 4.2.1 [dev:/usr/lib/haxe/lib/flixel/git]
format: [3.3.0]
hxcpp: [3.4.64]
layout: [1.2.1]
lime-tools: [1.5.7]
lime: [2.9.1]
nape: [2.0.20]
openfl-unityads: [1.0.7]
openfl: [3.6.1]
svg: [1.1.1]
swf: [2.3.1]
systools: [1.1.0]

I've tried with several Android versions (21, 23, 25) and Android Support Repository 47.

And here's the error I'm getting:

E/AndroidRuntime( 1127): FATAL EXCEPTION: main
E/AndroidRuntime( 1127): Process: com.MyExample.OpenFLHelloWorld, PID: 1127
E/AndroidRuntime( 1127): java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/util/ArrayMap;
E/AndroidRuntime( 1127): at com.google.android.gms.common.api.GoogleApiClient$Builder.(Unknown Source)
E/AndroidRuntime( 1127): at com.google.android.gms.common.api.GoogleApiClient$Builder.(Unknown Source)
E/AndroidRuntime( 1127): at com.gpgex.GameHelper.createApiClientBuilder(GameHelper.java:238)
E/AndroidRuntime( 1127): at com.gpgex.GameHelper.setup(GameHelper.java:278)
E/AndroidRuntime( 1127): at com.gpgex.GooglePlayGames$1.run(GooglePlayGames.java:66)
E/AndroidRuntime( 1127): at android.os.Handler.handleCallback(Handler.java:739)
E/AndroidRuntime( 1127): at android.os.Handler.dispatchMessage(Handler.java:95)
E/AndroidRuntime( 1127): at android.os.Looper.loop(Looper.java:211)
E/AndroidRuntime( 1127): at android.app.ActivityThread.main(ActivityThread.java:5389)
E/AndroidRuntime( 1127): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 1127): at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 1127): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
E/AndroidRuntime( 1127): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
E/AndroidRuntime( 1127): Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.util.ArrayMap" on path: DexPathList[[zip file "/data/app/com.MyExample.OpenFLHelloWorld-2/base.apk"],nativeLibraryDirectories=[/data/app/com.MyExample.OpenFLHelloWorld-2/lib/arm, /vendor/lib, /system/lib]]

I even tried to add android-support-v4.jar manualy to 'libs' folder using <java path="libs/android-support-v4.jar" />
But, there's no android.support.v4.util.ArrayMap in the android-support-v4.jar that I found:
http://www.java2s.com/Code/Jar/a/Downloadandroidsupportv4jar.htm

What can I do in order to resolve this?
Thanks for your help.

@Txori
Copy link
Author

Txori commented May 2, 2017

Hi, I've finaly managed to compile and run it without crash when calling GooglePlayGames.init(false);

I had to get the file /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/19.1.0/support-v4-19.1.0.jar and copy it to the libs directory.
All versions of support-v4 after 19.1.0 have an .aar extension instead of .jar, and there don't seem to be any 'class' files in it...

Now I'm going to implement a leaderboard and see if everything is good.

EDIT:
Yeah! It works like a charm. Maybe you should take a look at how the new versions of support-v4 handle the jar file and add some explanations to the read me file :)

@hemabhravee
Copy link

Hi, I've finaly managed to compile and run it without crash when calling GooglePlayGames.init(false);

I had to get the file /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/19.1.0/support-v4-19.1.0.jar and copy it to the libs directory.
All versions of support-v4 after 19.1.0 have an .aar extension instead of .jar, and there don't seem to be any 'class' files in it...

Now I'm going to implement a leaderboard and see if everything is good.

EDIT:
Yeah! It works like a charm. Maybe you should take a look at how the new versions of support-v4 handle the jar file and add some explanations to the read me file :)

Can you please explain how you fixed it step-wise? I'm working on a flutter app and getting the same exception and then my app crashes.

@Txori
Copy link
Author

Txori commented Oct 13, 2019

That was 2 years ago... But I'll see if I can still compile that project to Android and try to remember what I did to make it work when I'll get back home.

@VivekDosaya
Copy link

Hi, I've finaly managed to compile and run it without crash when calling GooglePlayGames.init(false);
I had to get the file /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/19.1.0/support-v4-19.1.0.jar and copy it to the libs directory.
All versions of support-v4 after 19.1.0 have an .aar extension instead of .jar, and there don't seem to be any 'class' files in it...
Now I'm going to implement a leaderboard and see if everything is good.
EDIT:
Yeah! It works like a charm. Maybe you should take a look at how the new versions of support-v4 handle the jar file and add some explanations to the read me file :)

Can you please explain how you fixed it step-wise? I'm working on a flutter app and getting the same exception and then my app crashes.

Did you fix it with your flutter project?

@hemabhravee
Copy link

Hi, I've finaly managed to compile and run it without crash when calling GooglePlayGames.init(false);
I had to get the file /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/19.1.0/support-v4-19.1.0.jar and copy it to the libs directory.
All versions of support-v4 after 19.1.0 have an .aar extension instead of .jar, and there don't seem to be any 'class' files in it...
Now I'm going to implement a leaderboard and see if everything is good.
EDIT:
Yeah! It works like a charm. Maybe you should take a look at how the new versions of support-v4 handle the jar file and add some explanations to the read me file :)

Can you please explain how you fixed it step-wise? I'm working on a flutter app and getting the same exception and then my app crashes.

Did you fix it with your flutter project?

Yes I did

@emmanuelolaoluwa
Copy link

Hi, I've finaly managed to compile and run it without crash when calling GooglePlayGames.init(false);
I had to get the file /opt/android-sdk/extras/android/m2repository/com/android/support/support-v4/19.1.0/support-v4-19.1.0.jar and copy it to the libs directory.
All versions of support-v4 after 19.1.0 have an .aar extension instead of .jar, and there don't seem to be any 'class' files in it...
Now I'm going to implement a leaderboard and see if everything is good.
EDIT:
Yeah! It works like a charm. Maybe you should take a look at how the new versions of support-v4 handle the jar file and add some explanations to the read me file :)

Can you please explain how you fixed it step-wise? I'm working on a flutter app and getting the same exception and then my app crashes.

Did you fix it with your flutter project?

Yes I did
Hey, how did you fix it i am getting the same error then my program crashes

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

4 participants