Sysprogs forums › Forums › VisualGDB › Runtime problem with Android libraries tutorial
- This topic has 10 replies, 3 voices, and was last updated 11 years ago by hpetschko.
-
AuthorPosts
-
November 20, 2013 at 17:30 #688hpetschkoParticipant
Hi,
please see “Build problem with Android libraries tutorial” for the story so far.
Though I was able to build the application and the library, I am not able to run them.
I have tried this on a virtual 7″ WSVGA device with Android 4.2.2 and the standard settings given by the AVD Manager and on a physical 8″ device (Acer Iconia, Android 4.2.2).
Both are telling me “Unfortunately, AndroidProject1 has stopped”. The GDBLog is attached.The project is the same as in the above mentioned topic, only the platform version has been changed to 4.2.2.
Thanks in advance
H
November 21, 2013 at 02:16 #2804ketParticipantHi,
Look in the LogCat for any errors. When the app is killed it is usually Android itself killing it due to some problems related to the Java code or app setup.
You can display the LogCat window without a current debug session from Debug->Windows->Android LogCat.
November 21, 2013 at 06:03 #2805hpetschkoParticipantHi,
it seems like the library is not deployed. Please find attached the log output from the LogCat window.
The project is the one from “Build problem with Android libraries tutorial” as mentioned in my first post.Many thanks
H
November 21, 2013 at 18:34 #2807ketParticipantHi,
The library is deployed inside the apk file and it is put there during build. Check inside the apk file for the library with any zip program, it should be in the directory matching your abi. If it is not there try rebuilding the solution and watch for any errors or warnings, then check the apk again. The library is supposed to be first copied into the libs folder and then into the apk in bin.
November 22, 2013 at 16:42 #2808hpetschkoParticipantHi,
the library file is there.
Could you please check whether the tutorial is still working as inteded.
In the thread “Build problem with Android libraries tutorial” you told me that there have been changes in the Android build system (you also sent me a fix), maybe this also has an impact on the runtime behaviour.
If necessary I will send the project.Thanks a lot
H
November 25, 2013 at 05:24 #2809ketParticipantHi,
Yes, we can also replicate the issue. We are still looking into it deeper.
You could switch to using the static version of the library, then launching and debugging will work as there will be no additional library to load. The app will start without crashing using the shared version of the library if you add a System.loadLibrary(“AndroidLibrary1-shared”) call into the app’s Java code. This call should be before the System.loadLibrary(“AndroidProject20”) call. In our tests this was not enough to enable setting breakpoints in the AndroidLibrary1-shared library’s code, we are still looking into enabling that. If you could let us know which exact versions of Android NDK, Android SDK Tools, Android SDK Build-tools (listed in the Android SDK Manager), ANT and Java JDK you are using, it could help us narrow down the issue more. Also knowing the app’s target Android platform and the Android device’s platform would be helpful.November 25, 2013 at 09:02 #2806hpetschkoParticipantHi,
thanks for the effort so far!
I have attached a screen shot of the SDK Manager. The ANT version is 1.9.2, JDK is 1.7.0_45.
The device is an Acer Iconia Model A1-810 running Android 4.2.2. This is also the target platform of the project.
Hope that helps.H
December 2, 2013 at 04:50 #2810ketParticipantHi,
We have looked further into this. To enable debugging also in the dependent library, change the project’s (not the library’s) Android.mk file, the shared-prebuilt’s LOCAL_SRC_FILES should not contain the libs subfolder, but obj/local as in the case of static-prebuilt. Then the symbols will be properly loaded.
December 3, 2013 at 16:49 #2811hpetschkoParticipantDear support team,
we are nearly there.
By loading the library ‘manually’ the application starts without problems.
However breakpoints are still not hit, neither in the project’s c file nor in the one of the library.
I have attached the project.Thank you very much!
H
December 5, 2013 at 07:40 #2812supportKeymasterHi,
We tried your project, for us the breakpoints were set both in the project and library files. Have you tried rebuilding the project?
If you still experience issues with breakpoints, try the Android breakpoint issues tutorial for hints or submit us a full gdb log.
December 5, 2013 at 16:52 #2813hpetschkoParticipantHi,
uninstalling the app on the device did solve it.
Now the breakpoints are hit.Thanks a lot
H
-
AuthorPosts
- You must be logged in to reply to this topic.