Forums - finding NDK problem

6 posts / 0 new
Last post
finding NDK problem
Noam Segal
Join Date: 27 May 15
Posts: 3
Posted: Thu, 2015-05-28 03:41
Hi
 
I have followed your guide and when I tried to compile sanangeles project I got the following error:
 
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Android\Microsoft.Cpp.Android.targets(384,5): error : You seem to be using the (64-bit Target) version of the NDK. vs-android only currently supports the (32-bit Target) NDK.
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Platforms\Android\Microsoft.Cpp.Android.targets(384,5): error : Your ANDROID_NDK_ROOT: 'C:\android\android-ndk-r10e'
 
I have removed the 64 bit NDK and installed the 32 bit, but still I'm getting the same error.
(BTW, I installed in the same directory as before so its not environment variable issue).
 
please advice,
Noam

 

  • Up0
  • Down0
Noam Segal
Join Date: 27 May 15
Posts: 3
Posted: Thu, 2015-05-28 06:30

Hi

I solved the problem by installing the last version of vs-Android from:

https://github.com/gavinpugh/vs-android

After that I had a problem with my ant. I got error 9020, from searching in google I understood

that I need to use jdk 32 bit.

Later I got error that android 19 api is not installed. And finally

after the project was compiled, I couldn't attach the debugger (got timeout) although

I was using usb 3 !!!

Noam.

 

 

 

  • Up0
  • Down0
Gregory Pitts
Join Date: 6 Apr 15
Posts: 7
Posted: Thu, 2015-05-28 09:20

Hi Noam, 

The first thing that stands out to me is that I had to make some slight modifications to the vs-android. Therefore taking a new library and dropping it on top of that one that is provided with the Debugger could cause this issue. 

Specifically, there is an issue in vs-android that causes the gdb.setup file to be generated incorrectly. If you check your obj/local/armeabi-v7a/gdb.setup file and the string "file ./obj/local/armeabi-v7a/app_process" isn't on it's own line, then that is the root cause. Moving it to it's own line should allow you to attach. Just a note, please be aware that the file is generated whenever the project is compiled.

I'm also interested in why you cannot debug without taking the new vs-android. Can you please provide this information?

1) Device and Android build you are using
2) Visual Studio version (I'm assuming you are using 2013, since there are v120 in your paths)
3) Android ndk version (We currently support with r10d)

Thanks,
Greg

  • Up0
  • Down0
Noam Segal
Join Date: 27 May 15
Posts: 3
Posted: Sat, 2015-05-30 23:39

Hi Gregory

1. First thanks for answering :>

2. My gdb.setup is under  C:\Workspace\sanangeles2\libs\armeabi-v7a (not under obj/local/armeabi-v7a/gdb.setup).

The content of the file is:

set solib-search-path ./obj/local/armeabi-v7a
source C:/android/android-ndk-r10d/prebuilt/common/gdb/common.setup
directory C:/android/android-ndk-r10d/platforms/android-19/arch-arm/usr/include jni C:/android/android-ndk-r10d/sources/cxx-stl/system
 
so obviously I cannot find the string ""file ./obj/local/armeabi-v7a/app_process" 
 
3. I"m using visual studio 2013 update 4.
4. I"m using nexus 5 with Android version 5.1.1.
5.  I first tried ndk r10e (this the latest in google page) and it didn't work so I searched the web for r10d.
6.  first I used API 22 and I had to switch to 19.
 
Hope it helps
 
Noam.
  • Up0
  • Down0
Re: finding NDK problem Best Answer
Gregory Pitts
Join Date: 6 Apr 15
Posts: 7
Posted: Mon, 2015-06-01 09:58

Thanks for the information Noam. I'll try to reproduce the issue with your specifications and let you know how it goes.

Thanks,
Greg

  • Up0
  • Down0
Gregory Pitts
Join Date: 6 Apr 15
Posts: 7
Posted: Wed, 2015-06-03 18:12

HI Noam, 

I tested with:
Visual Studio 2013 Rel 4
Nexus 5, Android 5.1.1
Android NDK r10d 32 bit
32-Bit JDK

And sanangeles works fine for me. 

I know you mentioned your sequence of steps, which involved switching JDK versions, NDK versions, etc. Did you tried the version of vs-android that came with Debugger, except with the r10d NDK? We did find during testing that some versions of NDK weren't as stable as others, and so we definitely recommend that version. 

I think that once you get to that point where everything works fine except for the timeout happening (especially on an app as simple as San Angeles), then it's likely the gdb.setup file. 

In my previous post, I stated that "Just a note, please be aware that the file is generated whenever the project is compiled.". But after testing, I realized that my gdb.setup file doesn't actually get generated in the obj\local\armeabi-v7a directory until I try to launch/attach to the app. So my initial statement was wrong. So sorry about that. If you only checked for that file after building, try checking for that file after you attempt a debug. 

Thanks,
Greg

 

 

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.