I’ve been attempting to integrate Google Play Services into my game using nsight vsi, but I’m struggling to get it to package the application.
During the packaging phase, I’m getting the following error:
-package: 1> [apkbuilder] Current build type is different than previous build: forced apkbuilder run. 1> [apkbuilder] Creating testproject-debug-unaligned.apk and signing it with a debug key... 1> [apkbuilder] Found duplicate file for APK: AndroidManifest.xml 1> [apkbuilder] Origin 1: c:\AndroidProjects\testproject\Tegra-Android\Debug\bin\testproject.ap_ 1> [apkbuilder] Origin 2: c:\AndroidProjects\testproject\AndroidManifest.xml BUILD FAILED 1> C:\NVPACK\android-sdk-windows\tools\ant\build.xml:958: The following error occurred while executing this line: 1> C:\NVPACK\android-sdk-windows\tools\ant\build.xml:969: The following error occurred while executing this line: 1> C:\NVPACK\android-sdk-windows\tools\ant\build.xml:312: com.android.sdklib.build.DuplicateFileException: Duplicate files at the same path inside the APK 1> at com.android.sdklib.build.ApkBuilder.doAddFile(ApkBuilder.java:821) 1> at com.android.sdklib.build.ApkBuilder.addFile(ApkBuilder.java:507) 1> at com.android.sdklib.build.ApkBuilder.processFileForResource(ApkBuilder.java:872) 1> at com.android.sdklib.build.ApkBuilder.addSourceFolder(ApkBuilder.java:623)
So far, I’ve followed the information from the following posts
Google Play Game Services C++ Integration : https://devtalk.nvidia.com/default/topic/781698/?comment=4335540
Google Play Services : https://devtalk.nvidia.com/default/topic/754393/?comment=4244313
… as well as the tutorials on Google’s developer site, and whilst I can get my code to work with Eclipse … I seem to always encounter the error above when building using nsight vsi.
My process so far is:
- Create an Android Native Application using the Nsight VSI Wizard.
- Add Google Play Services to my applications, using android update project --library google_play_services\libproject\google-play-services_lib
- Modify the AndroidManifest.xml to remove the hascode="False" ( I found that if I left this in, then my apk would build, but would be missing the google play services classes .. also, the eclipse generated androidmanifest.xml didn't have the hascode section .. so seemed to make sense to remove it )
- Rebuild .. observe error
As a side note, if I create a bare-bones Android Native Application using the Nsight VSI wizard, without integrating Google Play Services, and remove the hascode=“False” from the androidmanifest.xml, I get the same error.
Any ideas / suggestions on what I’m doing wrong or where to go from here?
Or even better, if someone has a working example of integrating Google Play Services into an application using nsight, or knows of a working example that I could look at / diff against my project, that would be really great :)