Search This Blog

Showing posts with label IntelliJ. Show all posts
Showing posts with label IntelliJ. Show all posts

20 August 2014

nVidia + video tearing in my IDE

I have been having some problems for the last few months where the menu items in my IDEs (plural) were tearing.  Sometimes they wouldn't popup, sometimes more than one would be highlighted, etc.

I found this article from 2 years ago which I couldn't really follow to the letter.  My nv only had one of the specified settings. I don't have ccsm installed, etc.

The ONLY change I made was:

  1. sudo su - root
  2. echo CLUTTER_PAINT=disable-clipped-redraws:disable-culling >> /etc/environment
  3. reboot

So far it seems to be working fine.

22 May 2013

Android Studio desktop entry

I've been using IntelliJ for my Android development from the beginning.  The new from #io13 that they were switching to an IntelliJ-based IDE was awesome.  Of course, I had to download it and try it out.

First thing to note is that although the Ultimate edition of IntelliJ is supposed to have the same support; the two are not exactly the same.  Creating a new project in Android Studio has a different wizard (at least today).

I installed Android Studio in /usr/local/android-studio.  Upon launching Android Studio, I decided to try to do the "Configure | Create desktop entry".

This unfortunately caused an exception:

[  10724]   WARN - tions.CreateDesktopEntryAction - Unable to locate suitable startup script in '/usr/local/android-studio/bin'. java.lang.RuntimeException: Unable to locate suitable startup script in '/usr/local/android-studio/bin'. at com.intellij.ide.actions.CreateDesktopEntryAction.prepare(CreateDesktopEntryAction.java:148) at com.intellij.ide.actions.CreateDesktopEntryAction.createDesktopEntry(CreateDesktopEntryAction.java:99) at com.intellij.ide.actions.CreateDesktopEntryAction$1.run(CreateDesktopEntryAction.java:82) at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:493) at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:185) at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:226) at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:175) at com.intellij.openapi.progress.impl.ProgressManagerImpl$8.run(ProgressManagerImpl.java:400) at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:458) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722) at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:154)

The solution is just to create the desktop entry manually. Create the file ~/.local/share/applications/android-studio.desktop:


[Desktop Entry]
Version=1.0
Comment=Develop Android with pleasure!
Terminal=false
Name=Android Studio
Exec="/usr/local/android-studio/bin/studio.sh" %f
Type=Application
Icon=/usr/local/android-studio/bin/idea.png
Categories=Development;IDE;
StartupNotify=true
StartupWMClass=jetbrains-idea


That's it. Depending on your OS version and window manager, you may need to restart X and/or log out.

24 August 2011

IntelliJ IDEA and the Android Source tree

It can be quite annoying to develop in the Android source tree if you don't have your IDE properly configured.  I thought I'd share a few notes from my testing IDEA with the repo sync'd tree...

  • When initially making your project, make sure it is a fresh checkout or do a 'make clean'.  Otherwise, all the *_intermediates turn into separate modules.

  • When it auto-detects the Android Facets, uncheck them all. If the Android Facet is setup, you will resolve classes to android-x.jar instead of your module source.
    • It can also auto-generate gen/ directories which cause duplicate R.java clases during builds if the Android Facet is chosen.

  • Since we are not using the Android Facets, the R.java files become a problem.  To correct this, create a new module (and make it a dependency of any module needing the resolution):
Content Root: out/target/common/R
Module File Location: anywhere BUT out/*
  • You probably are not going to be working on every single module unless you work with Cyanogen.  Right click on a module and add it to your favorites.  In the top of the dock, click the pull down and choose to view your favorites.

  • Build from the command line.  You might be able to do it from within the IDE, but I haven't tried that.

Thank you to the JetBrains support team; and a special thanks to Serge Baranov who put up with me long enough to get some of these issues resolved.

07 January 2009

Android support for IntelliJ 8

I was trying to install this plugin to enable Android support in IntelliJ 8 (Linux version on OpenSolaris). It kept failing to install the plugin.

The terminal showed:
Execute unzip[/export/home/malachi/.IntelliJIdea80/system/plugins/Android_Support_6217.zip, /export/home/malachi/.IntelliJIdea80/config/plugins]
Execute delete[/export/home/malachi/.IntelliJIdea80/system/plugins/Android_Support_6217.zip]

Solution:
Extract the lib/android.jar from Android_Support_6217.zip directly into ~/.IntelliJIdea80/config/plugins (not into ~/.IntelliJIdea80/config/plugins/lib)
Start IntelliJ