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

Use play service resolver instead of bundling the android libs #42

Open
00christian00 opened this issue Nov 18, 2016 · 4 comments
Open

Comments

@00christian00
Copy link

00christian00 commented Nov 18, 2016

Handling android libs can be quite a nightmare once you have several plugins.
I noticed many have started using the play service resolver to bundle them, which just copy the libs from the sdk when needed:
https://github.com/googlesamples/unity-jar-resolver
This is much better and streamlined cause you don't end up with many copies of the same libs everywhere.
Could you implement it for the next version? It's very easy, just need to add one class which specify which libs you need.

@Allough
Copy link

Allough commented Nov 28, 2016

This is becoming an almost must have now. I'm about to drop Facebook entirely due to how much extra work it is to mess with all this crap. (Just wasted about an hour trying to get a clients game to build again, after importing Facebook).

+1!

@Khaled-Almoukhtar
Copy link

+1

@rchallenger
Copy link

rchallenger commented Feb 6, 2017

For now I could find necessary libraries adding next lines to my default dependencies. It solved versions conflict, but didn't help to run app normally. It always crashes.

	//general dependency
	Google.VersionHandler.InvokeInstanceMethod (
		svcSupport, "DependOn",
		new object [] {
			"com.android.support",
			"support-v4",
			"LATEST"
		},
		namedArgs: new Dictionary<string, object> ( ) {
				{
					"packageIds",
					new string[] { "extra-android-m2repository" }
				}
			}
		);

	//facebook dependency
	Google.VersionHandler.InvokeInstanceMethod (
		svcSupport, "DependOn",
		new object [] {
			"com.android.support",
			"cardview-v7",
			"LATEST"
		},
		namedArgs: new Dictionary<string, object> ( ) {
				{
					"packageIds",
					new string[] { "extra-android-m2repository" }
				}
			}
		);

@bdominguez
Copy link

bdominguez commented Mar 20, 2017

Recently Unity has added Gradle build system and Gradle templates:

{UNITY_PATH}\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\GradleTemplates

Combined with this that Unity is considering it we will have a much better workflow:

https://forum.unity3d.com/threads/dealing-with-new-style-aars-that-have-applicationid-in-their-androidmanifest-xml.380596/#post-2976463

Please write on that thread to push Unity working on this faster.

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

5 participants