playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.45k stars 959 forks source link

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

Open Ravenh0lm opened 7 years ago

Ravenh0lm commented 7 years ago

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 commented 7 years ago

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

Ravenh0lm commented 7 years ago

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

elitvynov commented 7 years ago

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 commented 7 years ago

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

zennboy commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

agree too, only Authentication, Leaderboard and Achivements works.

claywilkinson commented 7 years ago

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 commented 7 years ago

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 commented 7 years ago

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

mrmaiko commented 7 years ago

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 commented 6 years ago

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

mrmaiko commented 6 years ago

Just delete some of the jar files. I usually take the "lite" version that they include and delete the full version.

On Sun, Nov 12, 2017 at 3:17 PM, Dhanrajsinh notifications@github.com wrote:

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

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/playgameservices/play-games-plugin-for-unity/issues/1583#issuecomment-343764120, or mute the thread https://github.com/notifications/unsubscribe-auth/ADNu93f44DTlr74sJpien2zcQBEsZbYZks5s11I8gaJpZM4Lw3bS .