Solved Latest release of Qt does not work with XCode 8.2.1 on macOS Sierra
-
Yep. Thx. Set it in the AndroidManifest.xml
-
In file -> ../android_armv7/mkspecs/commonandroid-base-tail.conf
commented out -fstack-protector-strong from next line LBC re: arm-linux-androideabi-g++: error: unrecognized command line option '-fstack-protector-strong'
#QMAKE_CFLAGS += -fstack-protector-strong -DANDROID
QMAKE_CFLAGS += -DANDROID -
Next problem...
21:48:22: Starting: "/Developer/SDKs/QtMobile-5.7/5.7/android_armv7/bin/androiddeployqt" --input /Users/PSI/Projects/Qt-Mobile/OT2Go/qSpine/build-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Debug/android-libqSpine.so-deployment-settings.json --output /Users/PSI/Projects/Qt-Mobile/OT2Go/qSpine/build-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Debug/android-build --deployment bundled --android-platform android-21 --jdk /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home --ant /usr/bin/ant
Warning: QML import could not be resolved in any of the import paths: Qt.test.qtestroot
Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils
Warning: QML import could not be resolved in any of the import paths: QtQuick.Extras.Private.CppUtils
sh: /usr/bin/ant: No such file or directory
Building the android package failed!
-- For more information, run this command with --verbose.
Generating Android Package
Input file: /Users/PSI/Projects/Qt-Mobile/OT2Go/qSpine/build-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Debug/android-libqSpine.so-deployment-settings.json
Output directory: /Users/PSI/Projects/Qt-Mobile/OT2Go/qSpine/build-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Debug/android-build/
Application binary: /Users/PSI/Projects/Qt-Mobile/OT2Go/qSpine/build-Android_for_armeabi_v7a_GCC_4_8_Qt_5_7_1-Debug/libqSpine.so
Android build platform: android-21
Install to device: No
21:48:29: The process "/Developer/SDKs/QtMobile-5.7/5.7/android_armv7/bin/androiddeployqt" exited with code 14.
Error while building/deploying project qSpine (kit: Android for armeabi-v7a (GCC 4.8, Qt 5.7.1))
When executing step "Build Android APK"
21:48:29: Elapsed time: 00:54. -
@PSI_lbc you need to install Ant on your host PC
-
Or use Gradle, in any case updating the NDK to r10e would be a good idea.
-
@jsulm
Thx. I'll locate and try Ant first -
@SGaist
By NDK, do you mean just the NDK or SDK, NDK, Apache, and ADK?Thx.
-
In Creator > Preferences..
JDK Location:
/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/HomeNot a JDK location.
I guess The OS upgrade to Sierra did not include a Java update.. Does Qt require the newest Java version as well?
Just noticed the "Download" icons to the right of the "Devices" screen.. DOH!
-
NDK, there are more recent version that r10e but there's a bug in the gcc from latest 13 series. See here for more details.
For the SDK, use the latest.
-
OK. I'm a dummy. Where is the latest Android SDK? The Qt link takes you to a page that offers the Android Studio..which I downloaded..but cannot find the SDK.
Is it hidden in the Android Studio app bundle?
Current error preventing moving forward..
Qt Creator needs a compiler set up to build. Configure a compiler in the kit options.Suggestions?
-
Get just the command line tools
under the Download part of the Android Studio page.The compiler is provided by the ndk so if you pointed it properly it should detect it.
-
Thx. Deleted the Android Studio bs. Downloaded just the SDK tools..tools_r25.2.3-macosx.zip
Made sure the path to the tools folder was set. WahLah! Android now builds and deploys to device. Only minor bug was a visual StatusBar “style” issue. Easily fixed.
Now working on the iOS part of the equation. I have a Apple Developer Account. I have an active License. I’ve created and downloaded the certs and device provisioning profiles. The app builds but does not deploy to a device..signing issues. Xcode knows the cert and provisioning profile exist. Both are valid. I have tried removing the Cert and Provision from the Mac KeyChain and re-downloading both. In Xcode, I have tried Automatic and Manual provisioning..both give the same error when trying to deploy.
/Users/PSI/Projects/Qt-Mobile/OT2Go/qSpine/build-iphoneos_clang_Qt_5_7_1_for_iOS-Release/Release-iphoneos/qSpine.app:
invalid resource specification rule(s)Command /usr/bin/codesign failed with exit code 1
** BUILD FAILED **
The following build commands failed:
CodeSign Release-iphoneos/qSpine.app
(1 failure)
make: *** [xcodebuild-release-iphoneos] Error 65
12:59:55: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project qSpine (kit: iphoneos-clang Qt 5.7.1 for iOS)
When executing step "Make"
12:59:55: Elapsed time: 00:46.There is an output line in the build:
SDKROOT = iphoneos10.2
The 5s iPhone that is the “target device” is running OS 9.2. Could this be the issue? I’m stumped.
bolded text
-
ios { QMAKE_XCODE_CODE_SIGN_IDENTITY = "iPhone Developer" MY_DEVELOPMENT_TEAM.name = “PSI_ibc (Personal Team)” <- Replace with appropriate team name MY_DEVELOPMENT_TEAM.value = XXXXXXXXXX <- Replace with team ID that can be found in the membership page on the developer profile. QMAKE_MAC_XCODE_SETTINGS += MY_DEVELOPMENT_TEAM }
-
Thx.
QMAKE_MAC_XCODE_SETTINGS += MY_DEVELOPMENT_TEAM
OR..
QMAKE_IOS_XCODE_SETTINGS += MY_DEVELOPMENT_TEAM -
I've used it as shown.
-
Tried the fix you mentioned. It helped, but I was still getting:
error: invalid resource specification rule(s)Searched the Apple forum,,
https://forums.developer.apple.com/message/183357#183357Remove CFBundleResourceSpecification key from Info.plist and codesign works