ADT eclipse GUI problems - android

It doesn't fully load the GUI, I can't create new layouts. It doesn't generate any source files, even when I create a new activity. I have downloaded it several times, but I can't get it fully working. I've used eclipse before, I'm no stranger to it. The ADT I downloaded bugs as hell. I tried 32&64 bit, both didn't work. Here is a link to the ADT

To unhide a menu item or toolbar button:
Switch to the perspective that you want to configure.
Select command link Window > Customize Perspective....
Open the Menu Visibility or Tool Bar Visibility tab.
Find the item you want to hide. You can do this two ways:
Expand the menu or toolbar hierarchy to find the item you want to hide.
Click the Filter by command group check box to see a list of command groups which contribute items, and choose the command group the item you wish to hide. Then navigate to the item in the hierarchy in the Structure tree.
Hover over the item to get additional information:
a description of what the item does
the name of the command group which contributes the item (click the link in this item to switch to the Command Groups Availability tab with the appropriate command group selected).
any key bindings associated with the command the item performs (click the link in this item to open the Keys page of the Preferences dialog with the command selected, if possible).
if the item is dynamic, a preview of its current appearance (dynamic items are listed as [Dynamic]).
Check the check box next to the item. Uncheck a menu to hide all its children.
Click OK to cause the changes to take effect.

There are indeed some very annoying bugs in the latest ADT. I had the exact same problem. The simple solution would be to manually update your ADT plugins from Eclipse, but unfortunately, it's not so easy for most people. You can find all of the solutions (and solutions to the failed solutions) here.
If you don't want to try solution after solution, just do what I did and download Eclipse Juno, the ADT plugins and the SDK separately. If it's still not creating files or if it's giving you errors, you may have to clean the workspace and/or import some jar files.

Related

Is there a way to hide some modules of the project view in android studio

For example, is there a way to the project view just show the appcenter module and hide the others from the view.
(Answer for Android Studio 4.2.2, not tested with previous versions)
Maybe Android Studio Scopes may do the trick.
Open File menu > Settings
Navigate to "Appearance & Behavior" > Scopes
Create a scope with "+" button, give it a name, and select in the tree the relevant part you want to show. Nodes can be include or excluded in a single way or recursively.
When done, valid and close the dialog with Ok.
On top of the "Project" tool window, click the dropdown button to show all the available views (Project, Packages, ...) Here, the scope you've just created should be listed and can be selected.
The project tree should only show the scope configured items.

Android Studio 2.1.1 using tabs, not spaces, even though tabs are not checked in Settings

When editing Java files, if I'm at the end of the line and I type the Enter key, it starts the next line properly indented 4 columns, to match the line above. That's OK but it's indenting with a tab, not spaces, even though in File>Settings>Editor>Java>Tabs and Indents the checkbox for Use tab character is unchecked, and always has been.
If I just type the tab key I also get a tab, not spaces.
I never want to use tab characters; I always want to use spaces. I don't have this problem in Eclipse or Microsoft Visual Studio so it's not some system setting for my PC. Is there some other setting in Android Studio for this?
Edit: I tried the suggestion that Omar Al Halabi (below) made and it didn't work but while testing it I noticed something interesting: This tab problem seems to mainly apply to the beginning of the line, i.e., if I type Enter on the previous line, it immediately tabs over to the first indent position on the following line, using real tabs, not spaces. On the other hand if I'm typing some text on an existing line, once I've typed a little text, if I hit tab, it then tabs over using spaces.
hope this helps,
check Use Tab Character,
give all that values to zero than you not get space on enter in java code, like in below image,
one more thing is you have to change your code format settings or may need to disable it
This is not an answer, but I don't have enough reputation points to post my questions as a comment.
- Is this issue happening in all your Android Studio projects?
- Are you using the Default scheme for the general File->Settings->Editor->Code Style and also for the Java Code Style?
- Have you tried making a new Java Code Style scheme at the Project level for just one project as a test?
EDIT: This is a brute-force/shotgun approach.
Rename your \Users\<username>\.AndroidStudio2.1 directory (e.g., .AndroidStudio2.1_orig)
Open Android Studio and force it to use the default settings by choosing the "I do not have a previous version of Studio or I do not want to import my settings" option when the "Complete Installation" dialog window appears.
Run a recursive 'diff' between the new and old .AndroidStudio2.1 directories to find any changes you've made to the default settings so you can re-apply them. The settings are kept in XML files so they are human-readable. Keep an eye out for any differences that may affect Android Studio use of tabs & spaces, because those might be the source of the problem.
If this does not work, then you may have to re-install Android Studio.
Try opening Settings->Editor->Code Style->Java. Check "Use tab character". Click OK.
Then go to File->Invalidate Caches\Restart -> Invalidate and Restart.
Then, again, go to Settings->Editor->Code Style->Java. Now uncheck "Use tab character" and hit OK.
If it still doesn't work change tab size and indent and then restore them back if you want.
The IDE tries to position the lines as if they belong to the same block. Also very likely you had used the tabs on the previous line. You can try to deactivate Detect and use Existing file indents for editing

Android Studio: Keep project file tree state expanded

I am using the latest version of Android Studio. Every time I close Android Studio or start debugging/executing the project, the "Project Files" tree collapses.
Is there a setting to keep the tree expanded in the current state or to expand the whole tree again?
Don't use Project Files section. Use Android or just Project sections. They shouldn't collapse.
PS: Also Command+1 is the shortcut to open Project page.
Very annoying. You can solve it by clicking the gear icon, and select Autoscroll from source. Then, anytime you select a tab, it will expand and select the file in the tree view.
This worked for me:
Expand the packages
Click gear icon at the top
Untick Compact Middle Packages

Robotium - Trying to go click through menu

I have a menu in my app that i am trying to iterate trough. The menu consists of more than 10 items, but i only want to test the first 5 items (which i can select with either index or based on text).
I am looking for a generic solution that will
select menu item 1
do a text check
select main menu
select menu item 2
do a text check
select main menu
etc
However i also need to execute this on multiple devices with different screen sizes, so it has to scroll to the menu item in case its not yet visible on screen.
I've tried using different solutions from these boards, but i have not been able to succeed yet.
Any help would be greatly appreciated.
The issue here is because of a bug in robotium that was fixed after the latest release. The issue in question is https://code.google.com/p/robotium/issues/detail?id=550
The latest code on github does have this fix in (see here, so you could package the source yourself and use that as the latest version otherwise you are going to have to implement some methods that have the same functionality as that changed.
Edit
Robotium 5.0.1 is now available and should have the above fix in it.

Eclipse Android Graphical Layout is not giving the options on properties window

Eclipse Android Graphical Layout is not giving the options on properties window.
example: When i select any widget on my graphical layout editor to show the properties, when i click on "Text" property (value field) it shows the "..." button to select a string. When i click on the button, nothing happens and i have to fill it by myself. The same for other properties like Gravity (i have to fill it by myself instead of show me the options like "center", etc.
I've just updated to the last version available, anyway, this installation is very fresh (last weekend). I'm running on a ubuntu 11.04 also updated today. But this always happened to me, it never worked actually :( very frustrating.
I submitted this to android-developers mailing list and found that there is a bug (fortunately already fixed) on ADT for linux:
http://code.google.com/p/android/issues/detail?id=18348
the solution is:
Download the ADT r14 preview available here:
http://tools.android.com/download/adt-14-preview
many other bugs, mainly on interface design layout issues were fixed lately (and many linux-specific bugs).
On the Outline window, Right click on the relative layout (lets say) tree
choose "other properties" and then "All By Name". a window should pop up for you to enter the desired action.
the only thing that worked for me in order to relate action to button in Graphic layout on eclipse
(using windows 7 X64 Build: v22.3.0- 887826)

Categories

Resources