I am new to android development I started using "Hierarchy Viewer"...it works fine with emulator that comes up with sdk.
The thing is I want to use this on a real device. I have made my research and found because of security reasons it works only on emulator and developers phone, from various sources.
Official Android Developer Site
But I also found that by using the "ViewServer.java" in our project, we can use this tool on real device.
GitHub romainguy / ViewServer Link:
What I understand is there are 2 things to be done...
Include this ViewServer.java into our project
Add the INTERNET permission in manifest.(
<uses-permission android:name="android.permission.INTERNET"/>
)
And while reading the comments in the java file, I also understood how to use addWindow
method inside onCreate
and stuffs.
But even after all these while trying to install this app into my device, eclipse "Invalid APK File!"...for both real device and emulator.
But normal apps works with emulator, but not the app added with this java file in it!!!
And someone kindly explain me if anything else needs to be done. Because the link I shared have so many other files and I am not sure what they are and how to use them. All I cared about is the "ViewServer.java" file in it.
If possible can someone explain me step by step on what are all needs to be done?