playgameservices / play-games-plugin-for-unity

Google Play Games plugin for Unity
Other
3.47k stars 966 forks source link

Build Error: Duplicate Files in APK #1913

Open koalitygame opened 7 years ago

koalitygame commented 7 years ago

I just updated to the latest version (0.9.41), and now when I try to build out for Android I get this error:

screen shot 2017-09-16 at 5 14 16 pm
aalionline commented 7 years ago

@justinkmai I'm getting the same error as well :(

Any luck so far?

koalitygame commented 7 years ago

@aAAC Not yet :/

Desno365 commented 7 years ago

Same here after updating to the latest version of GPGS and latest Google Play Services package from the Android SDK manager

aalionline commented 7 years ago

Now we switched to Unity 5.6.3 + GVR 0.8, App is not crashing but it plays the video upside down and in portrait mode, doesn't goto landscape mode, we tried to use

Screen.orientation = ScreenOrientation.LandscapeLeft;

for orientation change but app crashes after using this line :(

justy-p commented 7 years ago

play-games-plugin-support.aar was moved from the Unity/Assets/Plugins/Android/MainLibs (or some similar path) folder into Unity/Assets/Plugins/Android/. Delete the one in the MainLibs folder. Let me know how it went.

Desno365 commented 7 years ago

Deleted Assets/Plugins/Android/libs/armeabi-v7a/libgpg.so and Assets/Plugins/Android/libs/x86/libgpg.so and it fixed the build error. However now Google play games just doesn't work anymore. It doesn't show anything, achievement, leaderboards, multiplayer. In the logcat there are many errors like this: GamesNativeSDK: Trying to show UI while waiting for a result from an existing UI. Please ensure that OnActivityResult is forwarded to the games C++ SDK from your Java activity. See android_support.h for more details.

With the version 0.9.39 everything was working fine. I haven't changed anything other than updating GPGS.

urshanselmann commented 7 years ago

@Desno365: I went through the same process, and adding this to my AndroidManifest.xml seems to have solved it for me:

<activity android:name="com.google.games.bridge.NativeBridgeActivity" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />

Desno365 commented 7 years ago

@urschanselmann it fixed the problem, thanks!

quicksly commented 7 years ago

Unfortunately the fix from @urschanselmann didn't work for me. I already had that line in my AndroidManifest.xml from before. So after updating from 0.9.40 to 0.9.41 I had to modify my mainTemplate.gradle file in \Assets\Plugins\Android\ to include the following line: compile(name: 'play-games-plugin-support', ext:'aar') and remove the following line: compile project(':MainLibProj')

In part of my bug hunting I also switched from gradle to the default build engine, but that doesn't help. So if you are actually using the default build engine, you might consider switching to the new gradle build... with all the little pains that comes with. Also make sure you do not have conflicts in the version numbers of your aar-libraries. This may happen when using other SDKs (like GameAnalytics for me).