I'm supposed to develop an android app using QtCreator in C++. QtCreator is, however, very user unfriendly and permanently confronts me with bugs and errors that I did not cause and do not understand. I'm still in the phase if building plain new project. The error that occurs when I build it is:
The process "C:/Qt/android.5.5.1/5.5/android_armv7/bin/androiddeployqt.exe" exited normally.
Pulling files necessary for debugging.
Package deploy: Running command "C:/Users/username/AppData/Local/Android/android-sdk/platform-tools/adb.exe -s 520592f0406021ce pull /system/bin/sh: readlink: not found D:/projects/build-androidtest-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_1-Debug/app_process".
Packaging error: Command "C:/Users/username/AppData/Local/Android/android-sdk/platform-tools/adb.exe -s 520592f0406021ce pull /system/bin/sh: readlink: not found D:/projects/build-androidtest-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_1-Debug/app_process" failed.Exit code: 1
Package deploy: Failed to pull "/system/bin/sh: readlink: not found" to "D:/projects/build-androidtest-Android_for_armeabi_v7a_GCC_4_9_Qt_5_5_1-Debug/app_process".
I have a suspicion that a piece of unix oriented code propagated into Windows version of QtCreator. It's a reported bug marked as fixed, but not in any released version, so I need to get it to work anyway.
Any ideas? I mean, is there actually anyone who uses Qt C++ android librarie in QtCreator on Windows? Because google searches are not very helpful on these topics.
Well it seems this is Qt creator bug to connect and debug the app you can try using qt libraries with visual studio and debug your application with VS.
UPDATE
it's a little bit hard but you can find the full process of doing that in here
Related
When creating a new project using the Android Studio Native C++ template I'm unable to debug the project on any device I own. Logcat reports not much info as to why.
Are there any extra steps I need to take to setup breakpoint debugging?
Could someone try create a new native template using android studio and see if they can get it debugging?
Android Studio was also reporting:
Debugger process finished with exit code 127. A library required by the native debugger might be missing on your system. See idea.log file for more details.
I found this stackoverflow post after a quick google:
Android Studio Debugger process finished with exit code 127
I couldn't find libncurses5 on my current distribution: Fedora, so instead opted to symlink the v6 libraries to v5:
ln -s /usr/lib64/libncurses6.so /usr/lib64/libncurses5.so
After doing this for all libraries listed in the idea.log (one after another) I was able to get debugging working in Android Studio
I am developing a fully native application in using C++ and pure CMake as the build system - no Android Studio involved at all (proof of concept here)
The code builds, apk is generated and can be installed and run via ADB without issue but I cannot get gdbserver64 to attach to the process for debugging.
More details:
App is built against SDK/NDK API level 30
Attempting to debug on an Android 11 emulator instance without Google Play
I can run adb root just fine
Image already includes gdbserver and gdbserver64, attempting to use those
Developer options and USB debugging enebled in emulator
App has android:debuggable="true" in manifest
But every time I try gdbserver64 :5039 --attach $(pidof my.app.id)
I get /bin/sh: <app_pid>: inaccessible or not found
What am I missing? And no, I cannot just move to Android Studio - this is a cross platform project that needs to be buildable using only CMake.
According to my observation, this may be a bug of prebuilt gdbserver. It treats the parameter after --attach as a program name and tries to start it.
It's not really an answer, but in similar configuration to yours I got same error message and unable to overcome this. For me, switching to lldb helped, see e.g.
I would like to know how I can debug an Android app by using lldb.
I mean using lldb from console not over Android Studio.
From what I found out, Android Studio is doing this:
Pushing the app to the device
Starting this app
Pushing lldb-server to the device
Starting lldb-server on the remote device
Forwarding the ports
Connecting to the local port which is forwarded to the device
I would like to achieve the same using lldb from the console.
Let's say I have already lldb-server on the remote device (because Android Studio did this already for me), what do I need to do is to connect to an App using lldb from the console?
Never tried, but maybe this could help:
LLDB remote debugging
Debugging C++ native libraries in Android using command line
Additionally:
ensure that APK's native libraries (lib*.so) are having debug info/symbols. I pull the apk locally, locate .so file, and check the output of binutils nm utility. When you get familiar with your .so files only checking the size of the .so file could be enough.
one can debug by attaching to a running process/application (attach) and in some cases you need to debug application on application start (run).
in some debugging cases phone/emulator requires root access (file manipulations)
if you manage to debug C++ libs within Android Studio - check Debug+Console and Debug+LLDB output tabs to find interesting commands/options/steps
the procedure looks quite complicated and fragile - arm yourself with patience, don't ignore warnings and don't skip steps.
The error I get is in this part:
running: '"C:\apache-ant-1.9.4\bin\ant" clean debug -f C:\Users\Robert\Desktop\N
ormero\Games\Aztec\frameworks\runtime-src\proj.android\build.xml -Dsdk.dir="C:\a
ndroid-sdk"'
The filename, directory name, or volume label syntax is incorrect.
Error running command, return code: 1
I'm running:
cocos run -p android
On windows 7 64bit. I have googled but I'm stumped. Also I'm not a genius in Java nor Android, hence I use Cocos JS.
EDIT: Someone pointed out to me that the dot (.) in proj.android might be causing the issue. Any way I can fix this easily?
EDIT2: It happens during the compile, but the weird thing is, I can execute the command it says it errors on, and then it goes BUILD SUCCESFUL.
Your python version is not suitable. reinstall python 2.7.5
and it will be work =)
I faced the exact same issue then searched and found that "The filename, directory name, or volume label syntax is incorrect" error message is probably related to Python.
The filename, directory name, or volume label syntax is incorrect
I have both Python 2 and 3 in my machine but my PATH is pointing to 2.7.0 due to failsafe setup for some node.js projects. Then I reviewed the release note of Python 2.7 below:
https://hg.python.org/cpython/raw-file/v2.7.12/Misc/NEWS
And found there are numerous issues are associated with path. Without touching cocos2d first, I decided to remove 2.7.0 and installed 2.7.8. (just an old binary)
The propblem was solved immediately.
(Thanks justderb to remind and more details are provided.)
I'm trying to build the V8 javascript engine for Android but I can't succeed for some reason. I follow the instructions given here. It all starts very well. I can issue the make android_arm.release -j8 command from my terminal and it seems very sweet for a while. Then suddenly I get this output:
/bin/sh: 1: /home/dbm/android/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/*-ar: not found
The statement is correct: there is no *-ar file at the specified location.
But what is an *-ar file? And how can I resolve this error?
The environment is a beast running Ubuntu 12.10 on a 64-bit architecture (with ia32-libs installed) and I build for/with/against Android NDK r8c.
There seems to be a problem in Ubuntu!?
Anyway - extracting via tar -jxf worked for me. See http://code.google.com/p/android/issues/detail?id=41187
The issue lies with the fact that the NDK build system prefixes the platform name to the commands that are run to build the source. If you notice the error you get, the correct platform prefix is missing from *-ar. Somehow, the platform name is being set to * instead of the correct prefix arm-linux-androideabi (giving the correct name arm-linux-androideabi-ar). You'll need to figure out where this information is being skipped. That should fix your problem.
PS. If I get some free time, I'll try and replicate your issue and see if I can give you the exact fix.
Use the 'tar -jxf' to extract the android ndk. If you use the 'Extract here' option, it seems to be leaving out some files.
ar is archive utility from gnu tools. Normally you should have a $NDK/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ar available in your tool chain. which looks like missing in yours.