gavinpugh / vs-android

Integrated development of Android NDK C/C++ software with Microsoft Visual Studio.
Other
119 stars 34 forks source link

Builded application dont run. #63

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I have got my own external library builded as test.a
2. I linked project(bitmap-plassa) with this library and all went ok
3. But when I execute apk on emulator, I got an error. Application falls down.

What is the expected output? What do you see instead?
Running bitmap-plassa sample linked with my external lib and using methods from 
it.

What version of the product are you using? On what operating system?
Windows 7 x64

Please provide any additional information below.
No additional information (

Original issue reported on code.google.com by prouse...@gmail.com on 13 Feb 2012 at 9:23

GoogleCodeExporter commented 9 years ago
Sorry, that's not really enough information to go on.

Could you include the contents of the output window from a complete rebuild of 
your project.

Also any output you can grab from the running of your app. Using adb or ddms.

Thanks.

Original comment by gavin.dj.pugh on 14 Feb 2012 at 5:35

GoogleCodeExporter commented 9 years ago
Hello, Gavin.
I did nit found your email adress, so I decided to write here.
I am a user of a vs-android tool.
It is real cool. I read all about it on wiki site and your blog, but did not 
found how to make my *.apk file able to using external *.so library.
I have got 2 projects: one is as in examples, builds into *.apk, and the second 
project is external library. So I can build library into *.a and link main 
project with it. But I cant use methods froim this library in runtime, because 
the application crashes. So, what should I do to bound my external *so library 
with my *.apk file?

Original comment by prouse...@gmail.com on 14 Feb 2012 at 6:57

GoogleCodeExporter commented 9 years ago
Thanks!

Did you add a call to:
System.loadLibrary()
To load up the new external .so?

I think you also have to place the .so into the /libs/armaebi/ directory as 
well:
http://stackoverflow.com/questions/7927210/how-to-include-prebuilt-shared-librar
ies-in-apk-with-eclipse

So that it gets built into the .apk file.

You can load .apk files with tools like WinRAR/Zip to see their contents, to 
check that the .so made it in there.

Original comment by gavin.dj.pugh on 14 Feb 2012 at 7:23

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Thanks a lot!

Original comment by prouse...@gmail.com on 18 Feb 2012 at 7:16

GoogleCodeExporter commented 9 years ago

Original comment by gavin.dj.pugh on 21 Feb 2012 at 11:38