Posts

Showing posts with the label Android Studio

When Gradle don't know your new added Native code

Image
This post talking about using Android studio with ver. 3.1.4 or above that will help you integrate your Native code more easily than the older version. Using default CMake.txt will help you alot during complie your native code. You map experienced with adding a native code language like C or C++ to your project. If you choose to check to support as an above image. You won't face with the problem that Gradle don't know your Native code files because Android studio will edit the configuration of Gradle automatically for you. There are sometimes, in the middle of developing. You have to integrate a Native code to you apps. This time Gradle comes to no idea about your files. You may have been warned "This file is not part of the project. Please include it in the appropriate build file" indicated that gradle did not known your CMakeLists.txt as the image below. What you have to do is to make the Gradle know you CMakeLists.txt  Navigate your proje...

We should monitor the memory when simulate our app.

Image
I have faced a problem during coding my android app. It was crashed when simulating on my actual device. Beside, reading an error or an exception on ‘logcat’. We may need to monitor it as well. (Just click at Android -> Monitor to monitor your usage of Memory, CPU or network) I have found that my app’s problem occurred from much usage of memory that came from I have not sampled my image size properly. So, this feature of android studio could be very useful.  We can working something more with this Memory monitoring like we can test to cause a ‘Gabage collection’ event and see – does our app still working properly when garbage collection occurring?  By just pressing this button  (Press ‘initiate GC’ button to manual cause some garbage collection) It sounds as easy as calling your gentle garbage man to pick you garbage up even you have none of them. We may want to see more detail about memory usage by pressing the ‘Dump Java Heap’ bu...