Android debugger does not attach to device

I followed the “Set up Android” steps from the documentation, using the version of TADP that ships with the engine (2.0r8). Here are the steps I take to deploy my C+±based game to the device:

  1. Visual Studio: Build configuration Development Editor - Win64
  2. Run the UE4 editor (VS prompts for out of date build always but doesn't build anything if I ask it to build, another bug)
  3. UE4 editor: Package the game using File > Package > Android
  4. Command prompt: Run the Installer .bat file in the package directory to get the code and data initially uploaded to the device. At this point I can launch the game on my device but if it crashes or has other problems I have to rely on logcat and other primitive debugging methods.
  5. Visual Studio: Kill the UE4 editor with the "stop debugging" button.
  6. Visual Studio: Build configuration Development - Android
  7. Select Debug -> Step Into. (VS prompts again for out of date build, choosing to rebuild or not has no effect on the result)
  8. Tegra for Visual Studio startup dialog appears, and successfully steps through
    • Deploying application
    • Launching application
    • Pulling device files
    • Starting GDB server
  9. A dialog appears on the device stating that it is waiting to connect to the debugger.
  10. The Tegra dialog fails on "Starting Java Debugger" with the error message "Failed to attach: Invalid access to memory location."

I have tested on Nexus 7, Nexus 9, and Samsung Galaxy Tab S, all with the same problem.

Please improve the Android toolkit!

Howdy ryani,

Thank you for reporting this issue. Would you happen to be using a newer version of Java on your machine? We have experienced this issue previously and updating to Java version 1.7 was causing this issue. We had to revert to 1.6, which is included with the TADP.

Let em know if this helps with your issue.

Thanks and have a great day!

Hey ryani,

Just wanted to check in with you and see if this has helped with this issue that you have been seeing. Be sure to let me know when you get the chance.

Thanks!

I do have Java1.7 installed, but wasn’t sure of the safest way to downgrade to 1.6 without breaking anything else on my machine. Instead I tried installing TADP3.0r4 from NVidia’s website, and was able to successfully build and connect. I still have tons of problems debugging (bugs in the debugger), but am able to make slow progress. If you are free to share, I’d love to be connected with one of your Android engineers to talk about workflow and understand what your team has been doing to work on this platform.

Hey ryani,

Glad to hear that the issue has been resolved. As for the second part of the last comment, you are able to see what is currently being worked on and addressed via our Trello board and GitHub. This is going to be the most efficient way to figure out what is currently being addressed with a certain platform.

If the Github link is showing up as 404 link, you will have to create a Github account and connect it to you UE4 account. Here is some documentation on how to complete that task: A new, community-hosted Unreal Engine Wiki - Announcements - Unreal Engine Forums

Thanks and have a great day!

ryani,
did u find anyway to debug c++ code ?