Solved Problem to build on Android Device
-
Hello,
i have some problems to export any example with the qt creator to my Andoid device.
I`m qiute sure, that im done the description under link text , but i´m still get an error.
Here some pictures of the error and the QT Settings:
The error: "Ein Prozess hat versucht, zu einer nicht bestehenden Pipe zu schreiben" seems to me, that the application can´t get access to my Android device.
I use an Samsung Galaxy Note 1 with Android 4.1.1 with debug mode.So, here the screens from the Settings:
+
I hope somebody can help me with this problem, maybe im only forgot to do some step.
greetz
Allerknappe -
Try it:
https://developer.android.com/studio/index.html
Find on the bottom page "Get just the command line tools"
Download tools for windows operating system, unpack and exchange with tools in android/sdk (in your path)and check checkbox "use gradle instead of ant", ok? (Second image)
-
Thank you for the fast answer.
I've tried, but i still get the same error code 14.
I have found a topic with the same problem here: https://forum.qt.io/topic/33773/android-deployment-with-5-2-0-beta1-fails-with-code-14/18I will try some solutions from this topic, maybe this will help.
-
Maybe you don't have installed API?
How version Android SDK You have set in project?
http://imgur.com/a/mDlVm -
Hi and welcome to devnet,
Which version of the NDK/SDK did you install ?
-
I use the Andoid SDK 2.3.0.0 and NDK 14.1.3816874.
what did you mean with API? Don't install QT the whole API with the extra programms to compile the code? -
Hey the compiling works now!
i have forgotten to check under Projects the use Gradle box.
but the System have now one more error.
The code is:D/dalvikvm(16771): Added shared lib /data/local/tmp/qt/plugins/platforms/android/libqtforandroid.so 0x41bf2320
I/Qt (16771): qt start
D/AndroidRuntime(16771): Shutting down VM
W/dalvikvm(16771): threadid=1: thread exiting with uncaught exception (group=0x40f6e2a0)
E/AndroidRuntime(16771): FATAL EXCEPTION: main
E/AndroidRuntime(16771): java.lang.UnsatisfiedLinkError: Couldn't load r1: findLibrary returned null
E/AndroidRuntime(16771): at java.lang.Runtime.loadLibrary(Runtime.java:365)
E/AndroidRuntime(16771): at java.lang.System.loadLibrary(System.java:535)
E/AndroidRuntime(16771): at org.qtproject.qt5.android.bindings.QtLoader.loadApplication(QtLoader.java:244)
E/AndroidRuntime(16771): at org.qtproject.qt5.android.bindings.QtLoader.startApp(QtLoader.java:647)
E/AndroidRuntime(16771): at org.qtproject.qt5.android.bindings.QtActivityLoader.onCreate(QtActivityLoader.java:183)
E/AndroidRuntime(16771): at org.qtproject.qt5.android.bindings.QtActivity.onCreateHook(QtActivity.java:266)
E/AndroidRuntime(16771): at org.qtproject.qt5.android.bindings.QtActivity.onCreate(QtActivity.java:273)
E/AndroidRuntime(16771): at android.app.Activity.performCreate(Activity.java:5188)
E/AndroidRuntime(16771): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1094)
E/AndroidRuntime(16771): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2074)
E/AndroidRuntime(16771): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2135)
E/AndroidRuntime(16771): at android.app.ActivityThread.access$700(ActivityThread.java:140)
E/AndroidRuntime(16771): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1237)
E/AndroidRuntime(16771): at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(16771): at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(16771): at android.app.ActivityThread.main(ActivityThread.java:4921)
E/AndroidRuntime(16771): at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(16771): at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime(16771): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1038)
E/AndroidRuntime(16771): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:805)
E/AndroidRuntime(16771): at dalvik.system.NativeStart.main(Native Method)
I/Process (16771): Sending signal. PID: 16771 SIG: 9
I/ActivityManager( 2006): Process org.qtproject.example (pid 16771) (adj 11) has died."org.qtproject.example" died.
I have allready tried to change the settings into android-16 and it check Deploy local QT libraries to temporary directory instead Bundle Qt livraries in APK, but it doesn't work.
Maybe you got here also help?
-
You use real smartphone or AVD? Try work with real smartphone.
You use appropriate android SDK?
-
i use a real smartphone, but i tried to use a other smartphone where i get other errors.
I think something with the libaries are wrong, so i try a different code. -
Which version SDK and version android you use?
-
SDK 2.3.0.0 and NDK 14.1.3816874.
and I'm use Android 4.1.1 with a Samsung Galaxy Note ( GT N7000)
Now I'm so far that i can install a stand-alone apk on the device, but after starting the app immediately the app closed and qt says application died.I've also tried to use ministro, but there he called me invalid qt version...
Also i tried to change in the AndroidManifest.xml some settings and in the Gradle file i download not the standard version 2.2.0, rather the version 3.3 .So on, I've tried some examples like accelbubble-example or some example code in the qt creator.
i use also the qt version 5.8.0 with the qt creator 4.2.0
Maybe somebody have a checked example code or description, which are created from qt for android ( AndroidManifest.xml, etc.)?thanks for helping
-
so after few days i solved the problem.
In the gradle files which are build from qt was written a wrong version.
I checked it under QT-Gradle-Plugin and changed it in the config and now it works!
I don´t know why qt build a config with incompatible version numbers.. but it works now.Thanks for trying to help