Quantcast
Channel: JetBrains Developer Community : Thread List - IntelliJ IDEA Users
Viewing all 5661 articles
Browse latest View live

Intellij Stuck Uninstalling Adobe AIR Apk File on Android Device

$
0
0

This was working fine before on this device (Samsung Galaxy S4), but now it juwst hangs on the "Uninstalling [Project Name]" part.

 

It works fine on the emulator, and even in other android devices it is working fine. I truied looking through the phone to manually delete the app file, but it is not there! I also tryied changing the name of the apk file and some other things in the descriptor xml, but that hasn't seemed to help at all. :/

 

Can someone please help?

What is going on and how do I fix it?

 

Screenshot_091015_120914_PM.jpg


How to close tasks in Android Studio

$
0
0

I am having problems getting the tasks feature in Android Studio to work. I connected to our Redmine Server and switching to new tasks works very well.

However, when I select 'Close Active Task' I get a menu where 'Commit  changes' is selected and greyed out/not editable. When I click OK  nothing happens. Is there something additional to properly close the  task and commit?

Editor slow, high cpu usage

$
0
0

I am using 13.1.2, build 135.690, on LInux Mint Release 14 (nadia) 64-bit

 

Machine specs: Processor: Intel® Core™ i7-2600 CPU @ 3.40GHz × 8, Memory: 15.7 GiB, ide system files are on ssd partition.

 

After continuous usage of ide, say 24 hours, left on overnight, the editor becomes very slow, one of its thread seems to be almost at 100% cpu utilization.

 

There is not much in the log, quite sparse, see below:

 

 

 

 

2014-05-21 00:41:34,502 [572779006]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.openapi.progress.impl.ProgressManagerImpl$1@771d5b4; elapsed time was 1322ms
2014-05-21 03:04:44,979 [581369483]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.util.Alarm$Request@2ca2eb32; elapsed time was 1405ms
2014-05-21 05:22:24,018 [589628522]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.util.Alarm$Request@2acd6d2f; elapsed time was 1333ms
2014-05-21 05:27:54,824 [589959328]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.openapi.progress.impl.ProgressManagerImpl$1@771d5b4; elapsed time was 1325ms
2014-05-21 06:36:43,428 [594087932]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.util.Alarm$Request@631d4d2b; elapsed time was 1328ms
2014-05-21 06:54:37,371 [595161875]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.util.Alarm$Request@12d324f2; elapsed time was 1406ms
2014-05-21 07:13:29,534 [596294038]   INFO - openapi.editor.impl.EditorImpl - Cache hits:69632, total requests:117294,file:///xxxxxxxxxxxxxxxxxx.java
2014-05-21 07:40:05,699 [597890203]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.util.Alarm$Request@529c69e8; elapsed time was 1403ms
2014-05-21 07:52:29,876 [598634380]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.openapi.progress.impl.ProgressManagerImpl$1@771d5b4; elapsed time was 1332ms
2014-05-21 08:18:38,404 [600202908]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.util.Alarm$Request@30e26e8a; elapsed time was 1326ms
2014-05-21 08:28:16,438 [600780942]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.openapi.progress.impl.ProgressManagerImpl$1@771d5b4; elapsed time was 1336ms
2014-05-21 08:54:04,574 [602329078]   INFO - ellij.concurrency.JobScheduler - 50 ms execution limit failed for: com.intellij.util.Alarm$Request@7783fb8e; elapsed time was 1326ms
2014-05-21 09:25:41,346 [604225850]   INFO - openapi.editor.impl.EditorImpl - Cache hits:12288, total requests:13080,file:///xxxxxxxxxxxxxxxxxxxxxxxxx.java
2014-05-21 09:28:11,958 [604376462]   INFO - openapi.editor.impl.EditorImpl - Cache hits:4096, total requests:6760,file:///xxxxxxxxxxxxxxxxxxxxxxxxxxxx.java

Hotswap/DCEVM doesn't work in Intellij IDEA (Community Version)

$
0
0

I have troubles in making use of the hotswap function in Intellij IDEA Community Version. Mine's v 14.1.4.

Each time after I fired off debugging and change the java code, I have already click rebuild project and press "Yes" on confirming reload classes. Intellij reports that changed classes are reloaded, but the application outcome is the same as before. I'm just trying the simplest Java application (i.e. not in scenarios like Tomcat, applet etc) with stuffs simply like System.out.println, string concats etc. What I've changed during debug mode is just method body codes, but not the method signature/name. I can't get it.

In Eclipse I just directly change the code and press save, then it just works.

What went wrong?

(Remarks:

In fact I'm attempting to use DCEVM which makes structure change possible (e.g. change class name, method name, add methods etc), thought that it would solve the problem of the hotswap problem found in Intellij. Needless to say, it didn't work.

In eclipse, I succeed in using DCEVM and can change the method names during debugging.

I further try hotswap-agent and it still didn't work; I've come across an article saying that the IDE must JDPA-connect to the JVM thru port 5000, but no matter how I tried, Intellij console shows that it is still connecting thru a random port (51018 below):

"C:\Program Files\Java\jdk1.8.0_60\bin\java" -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:51018...." Connected to the target VM, address: '127.0.0.1:51018', transport: 'socket'

Is it possible to force it to connect thru one specific port? Adding the DEBUG_OPT environment variable in the Run/Debug Config doesn't work)

OSX - Merge dialog gets into unresolvable modal state, requires Force Quit

$
0
0

Here's what happens:

 

1. I'm in the Resolve Conflicts dialog, with a few files that have conflicts.

2. I choose "Merge" on one of the files.

3. I manually resolve the conflicts by clicking the arrows to merge left and merge right.

4. Once all items are merged, for a split second I see a confirmation pop up to Continue or Save and Finish.

5. I'm immediately switched back to the Resolve Conflicts dialog, and that confirmation pop up is nowhere to be found -- not on the Resolve Conflicts dialog, not on the Merge dialog, not anywhere. At this point, the Merge dialog is blocked (I can't click on anything), and because it's a modal, my whole project is blocked. I've tried all sorts of things to resolve the modal, but I can't. The only way I can escape is to Force Quit the whole IDE, which, as you can imagine, is quite frustrating.

 

Attached is a screenshot of the split second I see the confirmation popup, before it disappears and I'm stuck. As you can see the confimation seems to be attached to something wrongly. I also have a video of the whole thing if that would help.

 

This happens alot, and consistently when it does (restarting IntelliJ IDEA repeats the steps above over and over, to the point that I simply cannot perform a branch merge and have to get a colleage to do it for me), but it doesn't happen all the time. I haven't figured out why it happens.

 

I'm using OSX with Git. I am using a Macbook Pro with 3 external monitors. I use IntelliJ IDEA exclusively on my main external monitor.

 

Any ideas? Thanks.

-Aaron

AdMob and IntelliJ 14.1

$
0
0

Hi Guys,

 

I have been lookking through many sites and recommendations on the net to figure out why I can't get a simple android app to work with the newest Google Play Services and AdMob.

 

I did the steps in the AdMob manual and:

1) Added the google-play-services jar as a dependency

2) Added google-play-services.jar just as a library in Module setting

3) Tried to import it using New -> Module from existing source. This makes IntelliJ break my project.

4) Put google-play-service.jar into my /libs folder.

5) Compile for API level 8, 11, and 13.

 

When I run the app it gets a FATAL EXCEPTION saying :

Error inflating class com.google.android.gms.ads.AdView

.

.

Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/google/android/gms/R$stylable;

 

My imports:

import com.google.android.gms.ads.AdRequest;
import com.google.android.gms.ads.AdView;

 

My simple onCreate:

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    AdView mAdView = (AdView) findViewById(R.id.adView);
    AdRequest adRequest = new AdRequest.Builder().build();
    mAdView.loadAd(adRequest);
}

 

And in my layout:

<com.google.android.gms.ads.AdView
        android:id="@+id/adView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_centerHorizontal="true"
        android:layout_alignParentBottom="true"
        ads:adSize="BANNER"
        ads:adUnitId="@string/banner_ad_unit_id">
</com.google.android.gms.ads.AdView>

So names and namespaces should be correct. I am testing on a Samsung Galaxy 5 and a Nexus 9. Same error.

In pure desperation my next try is to install Android Studio on another machine and se if that works better.

 

Any suggestions are appreciated.

Troubleshooting extremely long refreshes of Gradle projects

$
0
0

We have been migrating to use Gradle for all our builds.

 

We have three library projects that are loaded separately.  Two of them have a relatively small number of projects, and load very quickly.

 

The third one is pretty large, with near to 70 subprojects (all of which are generally pretty small).

 

This large project has grown to the point where doing a refresh from IntelliJ IDEA (14.1.4) is extremely painful.

 

It used to take an annoying, but relatively short time when a change was made to the root project.  It could take 30-45 seconds.

 

It has grown however, to take upwards of 20 minutes to do a refresh when I manually hit the refresh button, or a change to the root project occurs.

 

Are there any ways I should go about troubleshooting this?  It just seems to slow down, and takes longer and longer under tasks "Gradle: Resolve dependencies ':xyz'". 

 

I can run a full command line build with the gradle wrapper (v2.5), very quickly, so it is not that we have gone beyond some limit with Gradle itself.

 

Gradle Wrapper:

distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-2.5-bin.zip

 

Looking at the task manager (on Windows), IntelliJ idea isn't using any significant CPU time, but is using over a gig of RAM.  This amount is not especially concerning, unless it is bumping up to some limit that is causing things to go slow.  Our development machines have more than enough RAM to run the task (my machine in this particular instance has 96 gig of RAM, so there is plenty to allocate if necessary).

 

Regards,

Mark E. Scott, Jr.

IntelliJ giving 'internal error' for some (most!) quick-documentation invocations. Am I somehow mis-configured?

$
0
0

Using the Scala plugin, quick-documentation is not working for many cases where (I expect) it should, and reporting 'Cannot fetch remote documentation: internal error'

 

I am using a default install on Windows 8.1, with a project created by the SBT project creation wizard with no non-default configuration (at least conciously).

 

Here's a completely trivial example created by entering a minimal 'Hello world' app object into the empty project framework created by the Scala plugin project creation (SBT) inside a package called 'hello':

 

HelloWorld.jpg

If I select the 'App' from the 'extends' clause and invoke quick docs (ctrl-Q) I get an appropriate docs popup:

AppPopup.jpg

so far, so good.  If I now click on the link to 'DelayedInit' however the result is this:

InternalError.jpg

Looking in the IntelliJ log I see a long stack dump that begins:

 

2015-09-12 15:41:32,990 [  18712]   INFO - mentation.DocumentationManager - 

java.lang.NullPointerException

at org.jetbrains.sbt.editor.documentationProvider.SbtDocumentationProvider.org$jetbrains$sbt$editor$documentationProvider$SbtDocumentationProvider$$extractDoc(SbtDocumentationProvider.scala:33)

at org.jetbrains.sbt.editor.documentationProvider.SbtDocumentationProvider$$anonfun$generateDoc$1.apply(SbtDocumentationProvider.scala:29)

Probably related to whatever causes this (but I'm not sure it is), the presence of quick-doc info at all seems very erratic.  To illustrate here's a slightly perversely complicated hello world variant:

 

object Hello extends App {
  val someList = List("Hello world")

  def listHead(ls: List[String]): String = {
    ls.headOption.getOrElse("hmm")
  }

  println(listHead(someList))
}

 

Now if I select 'List' from either the val assignment line (the one defining 'someList') or the type specifier for the 'ls' param of the function 'listHead' and attempt to get quick doc:

TypeInfoOnly.jpg

Here I get some basic type-info, which doesn't include any JavaDoc related to the List class at all (which I think I should - contrast to what I got for 'App' in the earlier image).  If I try to click through the 'List' hyperlink I get the original 'internal error' issue.

 

I'm not sure if something is mis-configured, or I am simply misunderstanding something about quick-doc.  Can anyone shed any light on this for me?


Error during EJB.ear artifact deployment to Glassfish 3.1.2 Application Server from within IntelliJ Idea 14

$
0
0

I am getting this error during EJB.ear artifact deployment to  Glassfish 3.1.2 Application Server from within IntelliJ Idea 14.0.3

 

 

Connected to server
[2015-09-04 10:13:21,527] Artifact MyAppEar:ear: Error during artifact deployment. See server log for details.
[2015-09-04 10:13:21,528] Artifact MyAppEar:ear: java.io.IOException: com.sun.enterprise.admin.remote.RemoteFailureException: Error occurred during deployment: Exception while deploying the app [MyAppEar] : Invalid ejb jar [MyAppEjb-3.2.0.jar]: it contains zero ejb.
Note:
1. A valid ejb jar requires at least one session, entity (1.x/2.x style), or message-driven bean.
2. EJB3+ entity beans (@Entity) are POJOs and please package them as library jar.
3. If the jar file contains valid EJBs which are annotated with EJB component level annotations (@Stateless, @Stateful, @MessageDriven, @Singleton), please check server.log to see whether the annotations were processed properly.. Please see server.log for more details.

 

The order of deployment also matters as it is MyAppEar.ear and then other 2 wars dependent on it.

 

I am able to deploy the EJB.ear, and the other war files successfully externally via Glassfish Admin console.

 

I have to check the compatibility check-box while deployment from Glassfish Admin console.

 

See attached screenshot below and then it installs successfully.

 

Capture.JPG

 

How to achieve this same compatibility check for EAR deployment from within IntelliJ Idea ?

 

Please help!

How to coexist PyCharm and IntelliJ IDEA (Java)

$
0
0

I began using PyCharm (now 4.5) earlier this year. A couple of months ago, I began using IntelliJ IDEA 14 for Java development. I don't typically share projects between Java and Python, but in some of my Java projects, I need small Python scripts.

 

For now, I am using community editions for both.

 

I'm experiencing some confusion on these projects. Since I'm new to IntelliJ, I don't even know how to describe what's going on--things like IntelliJ IDEA asking me to configure for Python interpreter etc. I experimented unsuccessfully answering the questions (pop-ups) that came.

 

In particular, if I work in Java on a project that contains a Python script then drop IDEA to launch PyCharm, work on that script, then drop PyCharm and come back with IDEA, IDEA's nothing of SDK is messed up:

 

  Cannot start compiler: the SDK is not specified for module xyz.

  Specifiy the SDK at Project Structure dialog.

 

(The reason I do this is that I cannot run my Python script from IDEA. I've tried, but it works perfectly in PyCharm.)

 

There is a link in the upper right of IDEA I can click to indicate JDK 8 again which makes some of it work, but even after that I'll have to muck with the project or "un-IntelliJ" it then set it back up all over again for Java development. I'm sure I shouldn't have to keep my Python code separate from my Java code: I just don't know how to do this.

 

I would like to know whether I should use separate PyCharm and IntelliJ IDEA or should I expect to "merge" and do both with one.

Custom code inspection for Annotations

$
0
0

Intellij ships with the code inspection for @Path and @PathParam that checks that values in @Path are "consumed" by a @PathParam (for JAX-RS).

 

I've created a custom annotation for "consuming" the @Path to replace the @PathParam.

 

How would I go about (and any suggestions to extend/duplicate) creating a code inspector that would perform the same inspection for @Path with my custom Annotation?

 

The attached image shows an example.

 

Thanks.

License/subscription expiry date - confused.

$
0
0

Recently IDEA started to warn me about my subscription expiry:

 

08:59:04 Upgrade Subscription         Your IDEA upgrade subscription will expire in 24 days.         Renew your subscription before 2015/10/10 to get new IDEA versions as soon as they are released.         Renew now...         Remind me in a week         Do not remind again

 

However, when I check my JetBrains account, I got the following:

subscription.jpg

Could anyone explain why there are two different expiry dates? Also, I'd expect prolonged subscription to be till 2016/10/10 or 2017/02/06 (depends which expiry date is the "real" one) but it reads 2016/12/31...

Ant integration -- allow navigate to AntTask.class/java when clicking on task tag in build.xml

$
0
0

Hello guys,

 

When browsing an Ant build.xml file, is it possible to click on a task tag (such as <ftp ..... > ) in order to navigate to the corresponding class and/or java sourcein the linked Ant library ?    (for example apache-ant-1.9.4\lib\ant-commons-net.jar\org\apache\tools\ant\taskdefs\optional\net\FTPTask.class)

Gradle project sync failed. Basic functionality ... will not work properly

$
0
0

I've been getting this error in one of my projects in Android Studio for a couple of days now and have't been able to figure out what the problem is. When I sync the Gradle project it always says: Gradle project sync failed. Basic functionality ... will not work properly.

 

The project assembles, builds and tests properly from the command line. Here are the errors that I think are releated to the issue from the idea.log file. Any idea what could be wrong here? This project is a set of common classes and utitlities that will be used in several of our gradle build scripts.

 

Thansk, Derek

 

2015-09-16 07:47:47,502 [  80357]   INFO - e.LibraryDependencyDataService - Configuring library dependency 'Gradle: joda-time-2.8.2' of module 'gradle-common' to be exported and have scope Compile

2015-09-16 07:47:47,502 [  80357]   INFO - e.LibraryDependencyDataService - Adding library dependency 'Gradle: gradle-tooling-api-builders-2.7' to module 'gradle-common'

2015-09-16 07:47:47,502 [  80357]   INFO - e.LibraryDependencyDataService - Configuring library dependency 'Gradle: gradle-tooling-api-builders-2.7' of module 'gradle-common' to be exported and have scope Compile

2015-09-16 07:47:47,536 [  80391]   INFO - ty.VersionCompatibilityService - Failed to read version for component 'android-gradle-plugin' for project 'gradle-common'

2015-09-16 07:47:47,550 [  80405]   INFO - ls.idea.gradle.GradleSyncState - Sync with Gradle successful for project 'gradle-common'.

2015-09-16 07:47:47,554 [  80409]   WARN - .project.GradleProjectSyncData - Trying to create project data from a not initialized project 'gradle-common'. Abort.

2015-09-16 07:47:47,554 [  80409]   INFO - .project.GradleProjectSyncData - Failed to generate new cache. Deleting the old one.

2015-09-16 07:47:48,234 [  81089]   INFO - indexing.UnindexedFilesUpdater - Indexable files iterated in 350 ms

2015-09-16 07:47:48,236 [  81091]   INFO -       #com.jetbrains.cidr.lang - Clearing symbols finished in 0 s.

2015-09-16 07:47:48,237 [  81092]   INFO -       #com.jetbrains.cidr.lang - Loading symbols finished in 0 s.

2015-09-16 07:47:48,237 [  81092]   INFO -       #com.jetbrains.cidr.lang - Building symbols finished in 0 s.

2015-09-16 07:47:48,237 [  81092]   INFO -       #com.jetbrains.cidr.lang - Saving symbols finished in 0 s.

2015-09-16 07:48:02,633 [  95488]   INFO - indexing.UnindexedFilesUpdater - Unindexed files update done in 70193 ms

2015-09-16 07:48:02,635 [  95490]   INFO -       #com.jetbrains.cidr.lang - Clearing symbols finished in 0 s.

2015-09-16 07:48:02,635 [  95490]   INFO -       #com.jetbrains.cidr.lang - Loading symbols finished in 0 s.

2015-09-16 07:48:02,638 [  95493]   INFO -       #com.jetbrains.cidr.lang - Building symbols finished in 0 s.

2015-09-16 07:48:02,638 [  95493]   INFO -       #com.jetbrains.cidr.lang - Saving symbols finished in 0 s.

2

Could not checkout IntelliJ IDEA source code

$
0
0

Has anyone able to successfully download the source code & build IntelliJ IDEA?

 

I was using the instructions from this page http://www.jetbrains.org/pages/viewpage.action?pageId=983225

 

Both the approaches didn't work.

 

Command line error:

 

C:\sid\projects\IntelliJ>git clone git://git.jetbrains.org/idea/community.git idea

 

Initialized empty Git repository in C:/sid/projects/IntelliJ/idea/.git/

 

git.jetbrains.org[0: 174.129.30.43]: errno=No such file or directory

 

fatal: unable to connect a socket (No such file or directory)

 

 

IntelliJ IDEA Git Test connection error:

 

Cannot run program "git.exe" (in directory "."): CreateProcess error=2, The system cannot find the file specified

 

I have git.exe in the PATH

 

 

Any ideas?


PHP + Wordpress + Remote interpreter

$
0
0

I am trying to get setup to run and start some new projects. Primarily I work with WordPress and Python.

 

We have a development server on premisses so I setup the remote PHP interpreter.

Now that I am adding wordpress into the mix I am not sure if I have set things up correctly.

 

If I am using wordpress do I need to use a local interpreter for things to work correctly or is there a way to setup wordpress with the remote interpreter?

Custom "collapse by default" code folding

$
0
0

Is there a way to make custom "collapse by default" code folding options? Specifically, I'm using JavaScript Karma unit tests which are written using nested function calls describe() and it(), and I want to collapse all it() blocks by default.

 

-Aaron

using gson

$
0
0

Hi

 

I'm trying to use gson in a project but haven't tried adding/using libraries before beyond the very basics. I followed these instructions https://www.jetbrains.com/idea/help/configuring-module-dependencies-and-libraries.html#d1552849e127 and added the .jar files to the Library and its showing up under Dependencies. But when I try to use it with this code

 

Gson gson = new Gson();
MyType myobject = gson.fromJson(jsonSource, MyType.class)

 

IntelliJ isn't recognising it. Do I still need to use an import statement and if so, what exactly?

 

Edit: Intellij just prompted me to import the appropriate file, which is(import com.google.gson.Gson) if it helps anyone here.

 

thanks

Rebecca

Multi-line formatting broken for JSON injections

$
0
0

I have some code in a Scala source file that looks like this:

 

val config1 =
  """
    {
      "Experiment": {
        "simulationMode": true,
        "minutesAhead": [1, 5, 30],
        "stepSize": 60
      }
    }
  """

 

I can mark that manually for JSON syntax injection, and then do "Edit JSON fragment" to edit the text in a separate pane.

 

However, the text in the new pane looks like this:

 

{          "Experiment": {            "simulationMode": true,            "minutesAhead": [1, 5, 30],            "stepSize": 60          }        }

 

That's not very nice to edit.

 

Oddly, the reverse situation also happens - if I change my Scala code to this:

 

val config1 =
  "\n        {\n          \"Experiment\": {\n            \"simulationMode\": true,\n            \"minutesAhead\": [1, 5, 30],\n            \"stepSize\": 60\n          }\n        }\n      "

then the "Edit JSON fragment" pane shows up nicely like this:

{
  "Experiment": {
    "simulationMode": true,
    "minutesAhead": [1, 5, 30],
    "stepSize": 60
  }
}
Any way to have my cake & eat it too here, so that it's formatted nicely in both contexts?


many projects

$
0
0

hi guys. How to open many projects in one idea windows.I know what ideas standart its open only one projects per time. For example i have one big MAVEN projects with MANY maven child projects with many maven projects(fac.ing enterprise), but i need to only few projects of they, maybe 3 or 4, how open they only, maybe i can open PARENT project and make bookmarks for purposes projects(Now i find functionality those fix it particularly, i use GROUP for project, per purposes projects i set it in context menu for some group, but it group view only if i chose package mode in "Project" windows).

Say please some lifehack to fix it, i think i am not everyone with it problem.

Viewing all 5661 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>