I've opened my project in the morning and this line appeared in the Gradle app module.
There are three options : Move changes, Save Changelist and Ignore.
Does someone have an idea what's wrong and what I should do?
There was a open bug in IDEA regarding this issue:
IDEA-51396 Tasks: if conflicted file is opened in 2 editor tabs, tasks toolbar actions (switch changelist/move changes/ignore) don't make toolbar disappear
It's the IDE behaviours and you don't have to worry about it at all.
Choose what options suits you the best and continue your work.
It is related to source control of android studio. If you do not use inbuilt source control of studio just ignore it. If yes, then you can save the changelist and commit later.
Related
I've installed an IntelliJ IDEA Community Edition 2018.2.4 x64.
I've cloned a Project from Git (I learn a course on the "coursera").
The first task was:
"Click the green arrow at the left side from the code.."
I haven't any arrows. I can't run it from main menu, the programm ask me about configuration. What exactly I need to do?
"Run" is not available.
Asking about configurations.
Configuration's window.
The problem solved.
It was fun.. The firewall blocked all functions of mavel,jdk and part of IDEA. Adding to exceptions didn't help. Switching off the Firewall - helped.
Strange were: Empty repositories of maven, the same settings as at the another computers where it have worked.
Now everything is working.
You have to create a new configuration for Kotlin and specify the main class which would be lesson1.task1.SimpleKt. Then the disabled arrow will turn green and be clickable.
If you want to run the other examples you have to create a new configuration for each one since they all have their own .kt file with a main function.
Right Click on Project Folder->Module Settings -> Add src folder in sources in the following way
I tried to use the "shelf" feature for the first time in IntelliJ IDEA today. I shelved all my current changes so that I could work on a quick bugfix, commit it, and come back to my current work afterwards.
When I commited the "shelf" action, IntelliJ created the shelf and I could see it in the tool window. Then it reverted, and reloaded the project.
Now the shelf tab in the Changes tool window does not appear any more.
However in the file system I can see the patch file under .idea/shelf.
Why ? I suspect the problem is that the .idea directory is itself under version control. So when I shelved the changes, it file was included in the shelved changes, and then it was reverted, and IntelliJ is not aware of the shelved changes any more.
I am using Git.
How can I make IntelliJ aware of the patch file in the change tool window ? Or if impossible how can I restore these changes based on the patch file only ?
And how to use this feature in the future without encountering this problem ?
Is it a bad practice to keep the .idea directory in te VCS ?
The answer to the
How can I make IntelliJ aware of the patch file in the change tool
window ?
question was :
Create a bogus shelved change so that the "shelf" tab is available. It will not show if there are currently no shelved changes.
Right click in the "shelf" tab, select "import patch file", pick the previously create patch file. This creates the "shelf"
You can now "unshelf" the changes normally
Finally, I had to manually merge the workspace.xml file. After this, I think I will think about stopping to commit IDE project files to VCS. At least when it is a trivial task to recreate the IDE project from e.g. a checked out Maven project.
If you are ever lose the Shelf tab in a Jetbrains IDE, you may have shelved too large of a file (a 1.81 GB .patch in my case). You can view all of your patches in the Jetbrains shelf by going to:
/.idea/shelf
Delete the really large patch file and restart the IDEA and the Shelf tab reappears on the Git area .
If you don't see your .idea folder in your IDE, follow these steps:
Help > Find Action...
Search "Registry" and click the found action
In the Registry search "dot.idea" and uncheck the checkbox in the Value column for the projectView.hide.dot.idea Key
I had similar issues, but shelving bogus changes did not help (was using WebStorm, but the underlaying IDE is the same). The shelf window did not show up no matter what I did. Even though the shelved changes were created in the .idea/shelf folder. What actually in the end helped was moving/deleting .idea folder under the project completely (good to backup before deletion). And restarting JetBrains IDE.
For anyone (like me) still running into this issue:
The shelf tab is most likely there, but not displayed due to the width of the commit tab.
In the top right of the commit tab there are 3 icons:
arrow down
cogwheel
minimize
On the ARROW DOWN you see all the "hidden" tabs, which includes the tab "Shelf" for me.
Or you make the commit tab wider then you should also see the tabs at the top.
i am new to android. In the project most of the images are used, for some reason some of the images are not used.
But all the images are present in the res/drawable's folder. Going through the code to find which images are not used is a time consuming.
How could i check which images had not used anywhere in the project and remove it.
Solution with reference link could be better.
If you are using Eclipse you can run Lint Error Checking to know which files are used and which ones aren't.
Go to Window->Preferences->Android->Lint Error Checking
If you do any change in the list of enabled checks and click Apply you will be asked if you want to run lint. Click Yes and all the files that you aren't using will be marked with a warning.
Android Lint will do this for you. Check out Lint Tool - I guess, it otherwise depends on which IDE you're using. I know that IntelliJ will mark unused items in the main R.java file itself. But afaik, Eclipse doesn't do this.
Best bet is to use Lint. You can run it from command line also, so doesn't matter what IDE you're using.
I started to learn swing and downloaded netbeans to work through the tutorials. Unfortunately, when I create a JFrame design view hangs instead of loading and the Navigator and Inspector panes just show up empty.
System details:
Linux Mint Maya
Netbeans version 7.0.1
java 1.6.0_24
Any ideas would be greatly appreciated.
In whatever editor/designer you choose, consider the approach shown here, in which the top-level container is created manually and one or more content panels are maintained in the designer.
look in the Netbeans View menu and choose "IDE log"
There may be an error message / exception there, that might give you a clue.
Reinstalling the nb-javac plugin fixed this issue for me.
I followed the steps here and it resolved my problem.
For me, this was caused by a "FormGuardedBlockError", because at one point in my project I copied all of the source out into Notepad++ and used that to replace the .java file, thereby stripping all of the //GEN-BEGIN and related directives.
You can close NetBeans, open the .java file in a plaintext editor and put these directives back by hand, but it may be easier to merge with an earlier version of your code (if you have one).
For more details, check out http://wiki.netbeans.org/FormGuardedBlockError
Menu->view->show edit toolbar fixed this for me , of course the file you select to edit must have jframe, added to it I think for design tab to appear.
Go to Menu -> Option -> Select "Java" from option windows tool
then Active
I watch all of these Android tutorials online and am getting more and more into Android programming and I find it to be a slight hassle to have to go to File>New>Other>Android>Android Project every time, especially when the person I'm watching has it on theirs.
It would be very helpful if someone could provide me with a way for Android Project (and Android XML File) to be put on that "New" menu.
Thanks
You can add 'Android Project' to the 'New' menu (and customize others) as follows:
Window > Perspective > Customize Perspective... > Tab 'Menu Visibility' > Expand 'File' > Expand 'New' > Tick 'Android Project'
The first one is new android project and the last one is new android xml file.
you can also customize what you want to add thru customize prespective by right clicking the menu area.
If your using eclipse in the toolbar the 8th icon is to Create New Project (its a folder with a a and a + sign sticking out the top of it).
Are you sure you have your eclipse configured properly? I think you need to install ADT and Android SDK first.
If you already have installed them, restart your eclipse to work with it properly.
If not and want to check how and where to install check here.
Following these instructions can enable all these things you want. Feel free to comment.