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

Too many field references: 66334; max is 65536. #1583

Open
Ravenh0lm opened this issue Jan 29, 2017 · 13 comments
Open

Too many field references: 66334; max is 65536. #1583

Ravenh0lm opened this issue Jan 29, 2017 · 13 comments

Comments

@Ravenh0lm
Copy link

Hi.
I have build error:

CommandInvokationFailure: Unable to convert classes into dex format.
C:\Program Files\Java\jdk1.8.0_45\bin\java.exe -Xmx2048M -Dcom.android.sdkmanager.toolsdir="C:/Program Files (x86)/Android/android-sdk\tools" -Dfile.encoding=UTF8 -jar "D:\unity 5.4.1\Unity\Editor\Data\PlaybackEngines\AndroidPlayer/Tools\sdktools.jar" -
stderr[
trouble writing output: Too many field references: 66334; max is 65536.
You may try using --multi-dex option.
References by package:
3 android.accounts
30 android.app
....etc.

Can you explain how to selectively use the Google Play Services packages?
In my plugins folder i have following files:

play-services-ads-10.0.1.aar
play-services-ads-lite-10.0.1.aar
play-services-auth-10.0.1.aar
play-services-auth-base-10.0.1.aar
play-services-base-10.0.1.aar
play-services-basement-10.0.1.aar
play-services-drive-10.0.1.aar
play-services-games-10.0.1.aar
play-services-nearby-10.0.1.aar
play-services-tasks-10.0.1.aar
support-v4-24.0.0.aar
support-annotations-24.0.0.jar

From PlayGame i need only leaderboars and achivement.
Which *.aar files are used to access these functions?

@elitvynov
Copy link

Same thing. I'm using few another plugins and because of this get this error. Did you find a solution?

@Ravenh0lm
Copy link
Author

I deleted play-services-drive-10.0.1.aar and play-services-ads-10.0.1.aar.
Authentication, Leaderboard and Achivements works.

@elitvynov
Copy link

Yeah, looks like play-services-ads-10.0.1.aar and play-services-drive-10.0.1.aar are the most biggest libraries.
Also, tried to removed play-services-nearby-10.0.1.aar, but get an exception on authentication.

@Ravenh0lm
Copy link
Author

Yes, play-services-nearby-10.0.1.aar need for authentication

@zennboy
Copy link

zennboy commented Feb 20, 2017

Why is nearby required for authentication? Doesn't seem related at all. It didn't used to be required. The fact that this plugin isn't modular is really killing us folks trying to use other SDKs (Facebook, Helpshift, etc..) and Unity cloud build (which doesn't have the ability to use multi-dex option).

@elitvynov
Copy link

Agree with zennboy - also play-services-nearby-10.0.1.aar is quite big file, it would be a very helpful to remove it and save a lot place for another filed references. "We need less field references..." :)

@Leuconoe
Copy link

Leuconoe commented Mar 9, 2017

agree too, only Authentication, Leaderboard and Achivements works.

@claywilkinson
Copy link

Thanks for the feedback. The nearby API is built into the C++ SDK, so changing that is very involved. I will pass along the feedback.

Drive is used for SavedGames API, so if that is not used I believe it is OK.

@Vixxd
Copy link

Vixxd commented May 31, 2017

Just had to sacrifice parts of the Facebook Unity SDK to be able to get this to work :( Downgraded it after receiving this error, decided to prioritize the google play SDK. Very annoying nightmare across multiple Unity plugins,

@BonnyShen
Copy link

Any news on this post. I just want Authentication work in my game. But a series of aar files was installed. :(

@mrmaiko
Copy link

mrmaiko commented Jun 18, 2017

The Facebook SDK is what really took me over after upgrading it, like @Vixxd

Trying to figure out what I can sacrifice from it.

@dhanrajsinh24
Copy link

Any news on this one?
No one from google to take care this one?

@mrmaiko
Copy link

mrmaiko commented Nov 12, 2017 via email

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

9 participants