Is there any way to export/restore filters for logcat. The reason I'm asking is that i got more then one computer i use and i got a lot of different filters for debug my application so i would like to avoid having to input hundrad of filters manually on each computer.
if this is not possible with the default tool for android development in eclipse is there any other log-plugin for eclipse that got this feature?
I did some googling after this but could not find anything on the subject.
You can copy the value of logcat.view.filters.list in <workspace>/.metadata/.plugins/org.eclipse.core.runtime/.settings/com.android.ide.eclipse.ddms.prefs from one workspace to another and it will both share the same configuration.
Related
I'm trying to see the contents of a database I'm using through the execution of my program via DDMS. I've looked at lot of questions on here that explain how it's done. My understanding relies on the fact that on clicking Tools--> Android--> Android Device Monitor, there is a change in perspective however nothing of the sort happens when I do the above. In fact, there seems to be no indication at all, that I selected the Android Device Monitor. Could someone please point me in the right direction of finding out what could be wrong?
Going off what #will421 said in the comments, I ran monitor.bat and the typed out monitor in the console (Both needed to be done.) and then I was prompted to enter my sdk path. What tripped me up was the fact that I had two folders labelled sdk and sdk1 so choosing the right one is important. To view the contents of the dtatabase, I just followed along with the great answer at View contents of database file in Android Studio
few days ago, when I was debugging an Android project under eclipse I've found some great functionality: "All instances..." and "Instance count". I wanted to share my findings with rest of my colleagues, but none of them had this functionality in their eclipse install (we all use eclipse 3.7).
What's even more weird now I'm also missing this functionality.
As far as I can tell this functionality is build within eclipse from version 3.3 and available to projects using Java 1.6 and above as mentioned here and here (we're using 1.6).
See bottom of this link to see what functionality I'm talking about. It even has it's own shortcut in options (ctrl+shift+n) so I think there must be a way to use it again.
I was looking for it while debugging and while the debugger was in "stopped" state.
Anyone can help me put eclipse in right view/perspective/state to see this functionality again?
EDIT
Here is the documentation entry from eclipse help page: link
Thanks for any suggestions,
kajman
After some more digging I came to following conclusion:
DalvikVM does not support "instance retrieval".
On eclipse help page mentioned in EDIT section it written:
This command is only available if the Java virtual machine you are currently using supports instance retrieval.
Maybe there is an option to enable this option in DalvikVM, but I doubt it unfortunately.
Also when debugging on phone "Drop to frame" functionality is missing.
My antivirus program (CA Anti-Virus) just started reporting the existence of "AndroidOS/SMSTroj.D!generic" in a few of the .dex files generated for my Android projects in Eclipse. (I'm not writing malware!)
Has anyone else seen anything similar?
Is my development environment infected somehow, or is this a false positive? How can I verify and, if it's real, disinfect my system?
I haven't found any info about this trojan (the CA site reports no info). Does anyone have pointers to info about this (in particular about disinfecting the development environment)?
Contacting CA does seem like a good idea, but it might also be interesting to create a blank/hello world app and clean/rebuild the dex files a few times and see if anything picks up. Somehow I doubt a virus would try to parse your program and see what it's doing (other than perhaps permissions of the manifest, I guess you could copy over those from your "infected" project) so a build of any dex I would think should give you the same results. I suspect it's a false positive too. If it comes through clean you can slowly add a few classes at a time from your "infected" project and narrow it down that way.
Yes its a TROJAN.
Have a look here.
https://www.virustotal.com/file/dcf44f7262682ec2274829e6a14dfde470ca60dc1fbb2b76ff1053230ae305c2/analysis/1323302988/
Let's say that I'm doing an Android project at the office, and that it is not just a hobby project, and that it is actually intended to be released and mass distributed. Would there be anything crippling about using the Android command line tools to manage the project, and just ignoring Eclipse? They describe here how to manage projects on the command line:
http://developer.android.com/guide/developing/projects/projects-cmdline.html
However, I can't get a feel for if those tools are production quality or not. Basically, I'm afraid that if I use the command line tools then somewhere down the line I'll have to do task "X", only to find out that task "X" is basically impossible or insanely difficult without Eclipse. Are there any such task X's? Or are the Android command line project tools actually viable for commercial projects?
I already know that you won't have a GUI designer, but I'm not that crazy about the GUI designer in Eclipse anyway. I constantly find myself pressing "Run Project" to debug my GUIs on the actual device anyway (layout preview be damned).
As for debugging, for the limited amount of debugging I do command line jdb is adequate, even if not always completely pleasant. And I bet I could set up a GUI debugger if I really had to.
The question is, are there any problems that would be considered effectively insurmountable without Eclipse? Or are there just minor annoyances that can be easily worked around (like the two I just mentioned above).
I realize that stack overflow isn't meant for discussion questions, and this question might seem like just that, but I think it doesn't have to be. If there really is something gigantically terrible about not using Eclipse, someone will mention it, and I'll give them the green check mark. If there isn't, then perhaps someone can point me to examples of existing large projects that use the command line tools instead of Eclipse, and I'll give that the green check mark instead.
Many people use Ant to build Android projects from the command line. Actually, in my opinion this is the preferred way, since it allows you to check everything that you need into a source control system and get predictable and repeatable builds every time.
So, the answer is "Yes"! Take a look at Using Ant to Automate Building Android article for more in-depth explanation how you manage this. Of course, using Eclipse is very convenient, but you don't really need it to build Android applications.
I use Maven for all of mine. See android-maven-plugin.
I am trying to restructure an existing app so that, except for a few override-able methods in a derived activity, all code will reside in a library. This still doesn't work for some reason, but in the process of attempting to troubleshoot this, I discovered much to my dismay that there are two .apk files installed, not one (when I run a debug session from eclipse):
The first (and larger file) is
having the original library name.
The second (only 20KB in size) is
having the derived application name.
Why is that and where can I learn more about this?
Could that explain the ClassNotFoundException problem I am having?
I found the answer myself. It turns out that I had 2 critical settings in the Properties of both projects not set correctly:
In the library project, "Is Library"
was not checked for some reason. I
could swear that I checked it, but
knowing how whimsical the Android
development environment under
Eclipse can be, I suspect that it
was unchecked by Eclipse (or the ADT
plugin) as a result of some glitch.
In the application project, I
neglected to add my library project
as a reference via the Add...
button. (how dumb could I be?)
Hoping this can be useful for other newbies to come.