NDK Version supported, GDB vs LLVM, Gradle., other issues …

Sysprogs forums Forums VisualGDB NDK Version supported, GDB vs LLVM, Gradle., other issues …

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #31764
    bfx
    Participant
    • What is the recommended version of NDK  to use?  VisualGDB  5.6 seems to default to  NDK R12 if allowed to install itself.  Isn’t  NDK R12 really old?
    • Are people using GDBSERVER or LLVM for debugging? Which is recommended?
    • Are people using ANT or GRADLE for builds?  VisualGDB seems to look for Gradle in a different folder than where Android Studio  keeps it.
    • Anyone running into the “build.xml file not found” problem when using ANT for building?
    • I’m having a problem with GDBSERVER, with the gdbserver log file saying:  Can’t open socket: Operation not permitted.

     

    Thank you 🙂

     

    #31765
    support
    Keymaster

    Hi,

    No problem, happy to clarify. A few years ago Google switched from distributing the Android SDKs/NDKs independently to having Android Studio automatically install them. Hence, on the VisualGDB side we support 2 workflows:

    • The legacy Ant-based workflow using NDK R12 and an older SDK version that can be still downloaded separately. It is recommend for targeting legacy devices, or for building legacy projects created with the Ant tools.
    • The new Gradle-based workflow. It involves installing the NDK/SDK via Android Studio and configuring VisualGDB to use them. You can then either import an Android Studio project as shown here, or create a new project using Gradle via VisualGDB Android Project Wizard. The new workflow utilizes the new Advanced CMake Project Subsystem, allowing to intuitively manage projects with large C/C++ code bases.

    The location of the Gradle, and the exact syntax varies between Android Studio versions and we periodically update VisualGDB to match it. Following your support inquiry we have started rechecking it with the latest Android Studio 2020.3.1 and will post a link to the updated VisualGDB build here and in the support inquiry you created in the next couple of days.

    GDB and LLDB work differently on different devices, so we advise trying both options to see what works the best with your setup.

    The socket issue with gdbserver might be caused by the permissions on your device. Please see this tutorial for a detailed explanation of a workaround.

    #31766
    bfx
    Participant

     

    Thank you for that fast reply! 🙂   I’m not a fan of using Android  Studio, which is why I like your tools so much ! 🙂

    Regardless, maybe the issue with gradle is in my version of Android Studio. I’m running 4.2.1 , although it says it was built on May 10, 2021.  I guess Google changed their versioning numbers on Android Studio.  Maybe I’ll uninstall and redownload Android Studio, just to be current.

    I *STILL* hear people say Android Studio is slow, and I think I still got gradle messages about “incompatible gradle daemons” (in my last project), and starting new daemons. To me, it seems gradle/android studio *STILL* don’t run fast and smoothly, which is why I still like old school Ant… 🙂

     

    #31769
    support
    Keymaster

    Hi,

    OK, we have updated VisualGDB to work with Android Studio 2020.3.1. Please feel free to try this build: VisualGDB-5.6.101.4490.msi

    We have rechecked both lldb- and gdb-based debugging, and updated the gdbserver installation logic that works better on newer devices without the manual gdbserver launching workaround.

    Regarding Ant, VisualGDB still supports it, although it may simply not work with the newer SDKs because it was never tested with them.

    Our integration tests for legacy Ant-based projects use the following SDK versions:

    Android SDK 20140702
    Android NDK R10D
    Ant 1.9.4
    JDK 1.8.0_5

    We stopped testing the Ant-based build with the newer SDKs, as it has been officially discontinued by Google and hence will very likely not work at all, or will require non-trivial fixes.

    If you do not specifically need any of the newer Android features, you can try downloading these versions manually, and the Ant-based workflow should work out-of-the-box. Otherwise, you may need to switch to Gradle, that is also fully supported on the VisualGDB side and should work the same way.

    For reference, below are the tool versions we used to verify the Gradle-based workflow:

    Android Studio 2020.3.1
    Android SDK 30.0.2/31.0.0
    Android NDK 21.4.7075529
    Gradle 6.8 (bundled with Android Studio)
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.