I am trying to use QT to develop android apps. I am using Ubuntu 17.10 and my kit is
qt-opensource-linux-x64-android-5.7.1
NDK is android-ndk-r10e-linux-x86_64
SDK is from android-studio-ide-171.4443003-linux
I am able to build a sample code but trying to deploy I get the following error marked in bold
Generating Android Package
Input file: /home/prajosh/Project/cpp_study/test_1/build-test_1-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-libtest_1.so-deployment-settings.json
Output directory: /home/prajosh/Project/cpp_study/test_1/build-test_1-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/android-build/
Application binary: /home/prajosh/Project/cpp_study/test_1/build-test_1-Android_for_armeabi_v7a_GCC_4_9_Qt_5_7_1-Debug/libtest_1.so
Android build platform: android-27
**Install to device: No
Cannot find template directory /home/prajosh/Android/Sdk/tools/templates/gradle/wrapper
20:27:26: The process "/home/prajosh/Android/Qt5.7.1/5.7/android_armv7/bin/androiddeployqt" exited with code 3.
Error while building/deploying project test_1 (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.7.1))
When executing step "Build Android APK"**
20:27:26: Elapsed time: 00:00.
Tried installing gradle but gives me an error
**java: symbol lookup error: /usr/lib/jni/libnative-platform-curses.so: undefined symbol: tgetent**
Could not get a correct solution after searches. Could anyone kindly, please point me the mistake?
Related
I am trying to develop a Android App using QT/QML.
I am using QT 5.9.1, downloaded from https://download.qt.io/archive/qt/5.9/5.9.1/, while installing i checked Android option also.
Downloaded Android SDK - sdk-tools-linux-3859397.zip and Android NDK - android-ndk-r16b-linux-x86_64.zip
Added both on QTCreator>Tools>Options>Devices
When compiling the program i am getting the following error.
../../Android/Sdk/ndk-bundle/sources/cxx-stl/gnu-libstdc++/4.9/include/cstdlib:72:20: fatal error: stdlib.h: No such file or directory
#include <stdlib.h>
^
compilation terminated.
Makefile:992: recipe for target 'main.o' failed
make: *** [main.o] Error 1
12:10:38: The process "/usr/bin/make" exited with code 2.
Error while building/deploying project HellotestAndr (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.9.1 for Android armv7))
When executing step "Make"
How can i fix this error?
I'm trying to build an android app using qt creator but I have a problem. It usually works just fine but now it give me this error:
[dx] Error occurred during initialization of VM
[dx] Could not reserve enough space for 1048576KB object heap
and
BUILD FAILED
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:888: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:890: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:902: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:283: null returned: 1
Total time: 4 seconds
Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.impl
Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Material.impl
Warning: QML import could not be resolved in any of the import paths: QtQuick.Controls.Universal.impl
Building the android package failed!
-- For more information, run this command with --verbose.
17:30:23: Le processus "D:\Qt5.8.0_android\5.8\android_armv7\bin\androiddeployqt.exe" s'est terminé avec le code 14.
Erreur lors de la compilation/déploiement du projet untitled13 (kit : Android for armeabi-v7a (GCC 4.9, Qt 5.8.0))
When executing step "Build Android APK"
Seems you have apache ant problem.
you should set SDK, NDK, JDK, apache ant to your Qt Creator.
More information :Getting Started with Qt for Android
download apache ant from here
For start build and run Qt Android examples to make sure all of those are working fine on your device.
Use Gradle instead of Ant.
Actualy ant is deprecated.
I'm trying to build an android application using gomobile but the commands gomobile install and gomobile build fail with gomobile: EOF . Before this error I was getting this error:
# golang.org/x/mobile/gl
In file included from /root/go/src/golang.org/x/mobile/gl/gl.go:17:0:
work.h:6:23: fatal error: GLES2/gl2.h: No such file or directory
compilation terminated. but it was fixed with yum install make gcc mesa-libGLES-devel mesa-libEGL-devel.
The application is mostly a networking application. Here are the imports. Do only certain packages work with gomobile or all of them?
"golang.org/x/mobile/app"
"golang.org/x/net/websocket"
"os/exec"
"flag"
"fmt"
log "github.com/golang/glog"
"io/ioutil"
"net"
"net/http"
"net/url"
"strconv"
OS: Fedora 22.
More info: I'm able to build https://github.com/golang/mobile/blob/master/example/network/main.go so I can only assume the issue is specific to my application.
It failed because AndroidManifest.xml was empty.
I'm so confused. I cannot compile an apk app. This is what I've done:
Installed Qt with this image (I know it's rather old, I will update
it soon):
qt-windows-opensource-5.1.1-android-x86-win32-offline.exe
Downloaded Android SDK and NDK and added in Options > Android
Now there is a weird warning and no apk output:
Qt versions for architectures mips, arm, x86 are missing. To add the
Qt versions, select Options > Build & Run >Qt versions.
And this is the Build & Run page:
Update:
I followed these steps and the build process finished. But some errors appeared :
http://doc.qt.io/qtcreator/creator-mobile-app-tutorial.html
10:47:21: Running steps for project Quick_test...
10:47:21: Configuration unchanged, skipping qmake step.
10:47:21: Starting: "C:\Qt\Qt5.3.0\Tools\mingw482_32\bin\mingw32-make.exe"
mingw32-make: Nothing to be done for 'first'.
10:47:24: The process "C:\Qt\Qt5.3.0\Tools\mingw482_32\bin\mingw32-make.exe" exited normally.
10:47:24: Starting: "C:\Qt\Qt5.3.0\Tools\mingw482_32\bin\mingw32-make.exe" INSTALL_ROOT="C:\Users\rosta\Documents\Qt Projects\build-Quick_test-Android_for_armeabi_v7a_GCC_4_9_Qt_5_3_0-Release\android-build" install
The system cannot find the path specified.
The system cannot find the path specified.
Makefile:773: recipe for target 'install_target' failed
mingw32-make: *** [install_target] Error 1
10:47:27: The process "C:\Qt\Qt5.3.0\Tools\mingw482_32\bin\mingw32-make.exe" exited with code 2.
Error while building/deploying project Quick_test (kit: Android for armeabi-v7a (GCC 4.9, Qt 5.3.0))
When executing step 'Copy application data'
10:47:27: Elapsed time: ۰:۰۰:۰۶.
I'm having a hard time setting up PowerVR SDK for Android on Windows 8 64, assuming I met all requirements:
Android SDK (fresh Eclipse)
Android NDK
Cygwin (with make)
PowerVR Android SDK 3.0
I can perfectly make and run an Android NDK sample. However, the same process fails for building any PowerVR sample (from the SDK). Here's the output when I try to run the makefile:
$ ndk
Compile++ thumb : OGLES2Texturing <= OGLES2Texturing.cpp
arm-linux-androideabi-g++.exe: error: C:/cygwin///cygdrive/c/Users/stfn/workspaces/android/03_Texturing/jni/OGLES2Texturing.cpp: No such file or directory
arm-linux-androideabi-g++.exe: fatal error: no input files
compilation terminated.
/cygdrive/c/android-ndk-r8d/build/core/build-binary.mk:269: recipe for target `obj/local/armeabi/objs/OGLES2Texturing//cygdrive/c/Users/stfn/workspaces/android/03_Texturing/jni/OGLES2Texturing.o' failed
make: * [obj/local/armeabi/objs/OGLES2Texturing//cygdrive/c/Users/stfn/workspaces/android/03_Texturing/jni/OGLES2Texturing.o] Error 1
I suppose the error should be related to a wrong path given to the compiler. To me it looks like a mixture of standard Windows and Cygwin/Unix paths: * C:/cygwin///cygdrive/c/Users/stfn/...*
If been through so many makefiles now trying to resolve this issue but I just don't know where else to look. This is the first time I tried messing with the NDK. I'm afraid this could be my last.
Any help would be greatly appreciated
1.in the Android.mk file, for the PVRSDKDIR, set the path of your project folder in your workspace.
2.Copy the build, tools, and shell folders from the powervr sdk folder to your project folder