Upgrade to SDK for Qt V 10.2.5 problem, Android only

4407
3
Jump to solution
02-27-2015 08:54 AM
ChuckBenton
Occasional Contributor

I've had a project running under Beta, using Qt5.3.2 on a Mac with the ArcGIS SDK, targeting iOS and Android.  I upgraded and am now running

Qt5.4.1

ArcGIS V10.2.5 for iOS and Android

The project deploys for the iOS target just fine.

For the Android I get a "Duplicate Resources" error while generating the Android Package, specifically:

:mergeDebugResources

/Users/tsidevelopmentmac2/QtProjects/build-BVTest2-Android_for_armeabi_v7a_GCC_4_9_Qt_5_4_1-Debug/android-build/res/values/strings.xml: Error: Duplicate resources: /Users/tsidevelopmentmac2/QtProjects/build-BVTest2-Android_for_armeabi_v7a_GCC_4_9_Qt_5_4_1-Debug/android-build/res/values/strings.xml:string/ministro_not_found_msg, /Users/tsidevelopmentmac2/QtProjects/build-BVTest2-Android_for_armeabi_v7a_GCC_4_9_Qt_5_4_1-Debug/android-build/__qt5__android__files__/res/values/strings.xml:string/ministro_not_found_msg

:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

It appears that strings.xml is duplicated in the following two folders:

.../res/values/strings.xml

.../__qt5__android__files__/res/values/strings.xml

Deleting one or the other doesn't help, as that they are generated earlier in the build process.

Does anybody in Redlands have an idea of what may be causing this, or how to resolve it?

Thanks!!

Chuck

0 Kudos
1 Solution

Accepted Solutions
LucasDanzinger
Esri Frequent Contributor

Hey Chuck-

In your Qt Creator preferences under Android, do you have the checkbox to use Gradle instead of Ant checked? I have seen a similar error to what you were seeing when I had this checked. If this is the case, and you do want to use Gradle, then go into your template at Android/Other files/res/values/strings.xml, and remove the ministro related strings and the fatal error string. It seems that these are not necessary if you are using Gradle, but are with Ant. Your other option could be to just use Ant instead of Gradle if you have no preference.

If that's not related to the issue, then just out of curiosity, could you try creating a brand new project with the template and deploying it to Android? That will help us determine if there is a change that needs to happen in the project or with Qt Creator/some prereq.

Thanks,

Luke

View solution in original post

3 Replies
LucasDanzinger
Esri Frequent Contributor

Hey Chuck-

In your Qt Creator preferences under Android, do you have the checkbox to use Gradle instead of Ant checked? I have seen a similar error to what you were seeing when I had this checked. If this is the case, and you do want to use Gradle, then go into your template at Android/Other files/res/values/strings.xml, and remove the ministro related strings and the fatal error string. It seems that these are not necessary if you are using Gradle, but are with Ant. Your other option could be to just use Ant instead of Gradle if you have no preference.

If that's not related to the issue, then just out of curiosity, could you try creating a brand new project with the template and deploying it to Android? That will help us determine if there is a change that needs to happen in the project or with Qt Creator/some prereq.

Thanks,

Luke

ChuckBenton
Occasional Contributor

Removing the strings.xml statements did the trick, thanks!

0 Kudos
LucasDanzinger
Esri Frequent Contributor

Great, thanks for the follow up, Chuck.

0 Kudos