Play-games-plugin-for-unity: Moving File Failed

Created on 24 Jan 2018  路  27Comments  路  Source: playgameservices/play-games-plugin-for-unity

After adding this plugin build fails with message:
Moving File Failed
"Moving Temp/StagingArea/android-libraries/com.google.android.gms.play-services-auth-api-phone-license-11.6.2/classes.jar to Temp/StagingArea/android-libraries/com.google.android.gms.play-services-auth-api-phone-license-11.6.2/libs/classes.jar: No such file or directory"

Unity Version 2017.2.0p2
Google Play Setup completed with Resolution Succeeded
Android SDK latest
JDK 1.8.0_161

Most helpful comment

Okay I was able to make it work but I dont know which solution worked for me :/ .. Now I am stuck at the signin dialog its not popping up at all so I have to fix that somehow.

Setups which I took to solve it:

  1. Open SDK, upgrade your Google play services and Google play license (I am not sure about the name)
  2. Uncheck the indexing of files - go to the parent folder of the project (C:\Users\yawar\Documents\GitHub\XXX). Right click on the folder "XXX" and go to Advanced properties in General. and uncheck the indexing which will be check by default.
  3. Remove the Read-Only from the project folder.
  4. Delete Google Play Services plugin from the Project + the Android folder from the Editor Folder.
  5. Now import the Plugin again. It will ask to remove the obsolete AndroidManifest. Click "NO".
    Thats it !!..

Hopefully it will help someone else.

All 27 comments

Same Issue.

I have the same issue. is there any workaround?

Had the same issue as well, reverted back to a previous version for now.

Came here today willing to update the plugin (from 0.9.40 as 3 months ago I skipped the 0.9.42 because of instability), saw that last release was done tonight, installed 0.9.50 and had same issue referred to another plugin, lost 2 hours trying to find a workaround to be able to help me and everyone here, failed and discarded all the changes from GIT.

My guess is that it's connected with the new Google Version Handler v1.2.61 and its new way of downloading plugins in .aar form instead of the former directory with JARs, if it forces this behavior on existing plugins they start to fail when building. I also tried upgrading to 0.9.50 without including GVH 1.2.61 but that's not working either.

Glad or not so glad to see others having the same issue. Does anyone have a workaround or stable version we can use for now? Can anyone contact claywilkinson or maybe Google as this seems to be their official plugin for Unity?

Yeah, had the same issue.

This might help:

  1. Make sure you have the updated Google Play Services, Google Repository, Google Support Repository and sdk
  2. Change the build settings in player settings from internal to gradle
  3. Make sure you package identifier is of the format as
    com.(company name). (product name)
    Ensure that the package identifier consists of the same product and company name, as the one you have given in the Player Settings

Same issue here on 2017.3 and version 0.9.50 of the plugin

Same issue here!

Also facing this blockade

Apparently it is a conflict with the ads plugin, I just deleted GoogleMobileAds and re-imported play services plugin and its worked!

Had to remove all of Unity Services and reimport the plugin and settings to work for me. But none of the basic functions, like showing leaderboard or achievements work. =( Do real Google devs actually work on this plugin?

Having same issue, any workarounds ? :/ ..

Changing "Build System" to "Gradle" instead of "Internal (Default)" in Build Settings works for me

Okay I was able to make it work but I dont know which solution worked for me :/ .. Now I am stuck at the signin dialog its not popping up at all so I have to fix that somehow.

Setups which I took to solve it:

  1. Open SDK, upgrade your Google play services and Google play license (I am not sure about the name)
  2. Uncheck the indexing of files - go to the parent folder of the project (C:\Users\yawar\Documents\GitHub\XXX). Right click on the folder "XXX" and go to Advanced properties in General. and uncheck the indexing which will be check by default.
  3. Remove the Read-Only from the project folder.
  4. Delete Google Play Services plugin from the Project + the Android folder from the Editor Folder.
  5. Now import the Plugin again. It will ask to remove the obsolete AndroidManifest. Click "NO".
    Thats it !!..

Hopefully it will help someone else.

Had the same issue. I just removed the plugin and then during importing when it will ask to remove the obsolete AndroidManifest. Click "NO" (like ShooterArk said above).

I solved this issue according to this link.
https://github.com/googleads/googleads-mobile-unity/issues/569

How I solved the issue:
I moved (to save) and deleted the "gpgs-plugin-support" folder (Assets\GooglePlayGames\Editor\m2repository\com\google\games\gpgs-plugin-support\0.9.42)
I ran Android Resolver > Force Resolve =>I got an error
I put back the folder in its place and ran Force Resolve again. And it worked.

However, if your project have GoogleMobileAdsVungleMediation.unitypackage you may face another problem like CommandInvokationFailure: Unable to convert classes into dex format.

HI All,

The issue happened to me when imported Version 9.50 over the 9.42

I managed to fix it by:

  • deleting all 3 folders in Unity (GooglePlayGames, PlayServiceResolver and Plugins/Android (this had to Del Twice as it re-appeared right after deleting)
  • Save>Quit unity
  • Open Unity
  • Reimport version 9.50 fresh to my Project
  • Setup again (in Window>Google Play Games>Setup > button "setup")
    Build Success
    Done

Hey, I solved the problem. Remove the package from the project and then re-import it. Click "NO" when Unity asks if it should remove the obsolete AndroidManifest from the plugins folder.

I was using the version - 0.9.50

screenshot_3

the libs folder in previous version is out of "com.google.games.gpgs-plugin-support-0.9.50" so when new version is imported the libgpg file duplicated. remove libs folder outside of "com.google.games.gpgs-plugin-support-0.9.50" folder

@AliAfsharii You are a GOD my friend, I ve been trying to solve this issue weeks now. You are a great savior! Thank you very much!!!

where exactly is the folder in that screen shot? I don't see that anywhere in the imported package. I found vaguely similar folder names, but none of the solutions here have fixed this issue for me. I wish the vendor would please get moving with the real fix; I have a client who needs this working yesterday.
Not sure if this helps, but I don't have any prior versions of this plugin installed, BUT I have a Vungle (an ad service) plugin installed. Though I would expect Unity plugins would not crash and burn because there's one other plugin installed that has a file it doesn't expect it to have.

I solved this by updating the android sdk, running Unity as Administrator, reimporting GPGS, and clicking "NO" when asking if they should delete the "obsolete" androidmanifest.xml.

Try to setup Android Resolver Settings:
image
image
Than click "Force resolve"
image
And you will get all neccesary files to build with Internal (default) build system:
image

after i paste the game assets into the plugin settings dialog it occurred
It seems that my situation is different from yours.

If you have (Google play service APIs) installed, i recommend you look for (Play service resolver) folder.
the folder contains the version of (Google play service APIs). if you find and install (Google Ads) the same as this version, you can avoid [Dex format error] when you run the build.

i tried all of your advices. but none of them worked.
Just go back to old 2017.4 version and you'll be fine

gradle build worked for me .
using Unity 2018.2.1f1 Play services version 0.9.50
after build apk crashed on start .
got error of app id should be an integer
removed extra space from app id in xml file .
now its working .
if it asks for removing or replacing old manifest file . click NO

Was this page helpful?
0 / 5 - 0 ratings