I'm getting a compilation failure in IDEA 12 when trying to compile a Gradle project with the Groovy plugin installed and using Groovy version 2.1.3. The error I'm getting in IDEA that I don't see on the command line is here:
https://gist.github.com/jbrisbin/5416187
I'm using #CompileStatic in extension classes, if that's helpful.
Any ideas on workarounds?
Apparently when you create a new project in the latest versions of IDEA, the "external build" option is by default checked.
If you go into the settings and uncheck it [1], this error goes away (and the extremely excessive CPU usage goes away as well!).
Thanks to JetBrains support for the pointer.
[1] - http://img189.imageshack.us/img189/3550/20121206235318.png
Related
So basically I haven't opened my Android Studio project for almost a year and this time was the time for it to be opened and built. After updating Android Studio and all of the project's plugins, I finally reach this error:
Execution failed for task ':app:processDebugResources'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Failed to transform play-services-base-17.1.0.aar (com.google.android.gms:play-services-base:17.1.0) to match attributes {artifactType=android-compiled-dependencies-resources, org.gradle.status=release}.
> Execution failed for AarResourcesCompilerTransform: C:\Users\Me\.gradle\caches\transforms-2\files-2.1\d92a27efcac738b4f280b9ad0c07bda7\jetified-play-services-base-17.1.0.
> AAPT2 aapt2-4.1.1-6503028-windows Daemon #0: Unexpected error during compile 'C:\Users\Me\.gradle\caches\transforms-2\files-2.1\d92a27efcac738b4f280b9ad0c07bda7\jetified-play-services-base-17.1.0\res\drawable-xhdpi-v4\common_google_signin_btn_text_dark_normal_background.9.png', attempting to stop daemon.
This should not happen under normal circumstances, please file an issue if it does.
I hope someone could help me resolve this issue. Thanks in advance.
update 07 May 2021
With Android Studio 4.2 and the corresponding android gradle plugin v4.2.0 (which requires gradle 6.7.1) the build now works for me also on my older AMD.
So I guess the problem has been fixed :)
(would be great if someone else can confirm via comment)
original answer
Hi have exactly the same issue.
The project builds on 2 of 3 tested PCs. The only difference I see is, that is not working on an older AMD processor. The PCs its working with have both Intel CPUs (an older i7, 2. Gen, and a new i7). All three PCs are running with Windows 10 Pro.
My dev environment is set up equally on all 3 PCs.
I hope this information helps to find a maybe better solution.
The only solution I found is to go back to a previous version of the Gradle plugin and Gradle itself.
In gradle-wrapper properties I defined Gradle version 6.1.1
distributionUrl=https://services.gradle.org/distributions/gradle-6.1.1-all.zip
And in the project build.gradle I set version 4.0.2
classpath 'com.android.tools.build:gradle:4.0.2'
Try:
Invalidate Cache / Restart
Clean Project
Rebuild Project
Along same lines: I too am getting this same error but oddly, my project is stored on OneDrive so I can access it/modify it from different locations. The SAME project builds, installs and runs with no issue at one location (with my phone connected to computer), but the error shown above takes place when accessing the same files from the other location (with the same phone connected).
The same version of Android Studio is being used at both locations as well. This was not an issue with this same project a few days ago (i.e. - it ran properly from both locations until recently)
The solution offered previously here does not fix the issue.
Would not normally put this response here but thought perhaps my experience with the same error message could help shed some light on what is happening.
the same topic is discussed here. I have the same behavior the same project builds without a problem on i7. But produces an error on an old AMD processor.
I'm trying to resolve some dependency issues when using an externally installed Gradle, rather than the one that come with Android Studio (AS). I then came across the particular AS setting under
File > Settings > Build,Execution,Deployment > Build Tools > Gradle > Runner.
[x] Delegate IDE build/run actions to Gradle
This is apparently also available as the Gradle config delegateBuildRunToGradle. But I can't find any sane explanation as to what it does. I thought all AS builds used Gradle...
While the Gradle doc page say it's on by default. This was not the case for my AS 3.2.2.
What does this option do?
(When should it be used?)
I was hoping to have a more precise answer, but since nothing has come forward here, I guess the only answer is that (what is written in the screenshot above) the IntelliJ IDEA has it's own way to make the builds. For many practical purposes it is probably better to have a more updated and working Gradle installation and enable the above option, to let it do its job.
I have a Groovy-indy project running in Intellij 13 with Gradle.
dependencies {
compile 'org.codehaus.groovy:groovy-all:2.3.7:indy'
...
The problem is that I have two dependencies in my libraries. The indy version and the normal version.
How can I get rid of the non indy version.
Just removing it is not an option as it is back after restart or Gradle refresh or any other occasion.
Update Intellij 14:
Now with intellij 14 there is a different Problem:
Error:Groovyc: Cannot use invokedynamic, indy module was excluded from this build.
the dependency is the same.
So if you right-click your project in the Project pane (where you drill-down into folders and such), I had a context-menu option called "Add Framework Support", which allowed me to add Groovy (asked for a Groovy home and added it as a Global Library).
After that, go to Project Settings -> Build, Execution, Deployment -> Compiler -> Groovy Compiler. There you should see a checkbox called "Invoke dynamic support". I unchecked that and that removed this error for me.
If you actually ARE trying to use dynamic support, then unfortunately not sure what the deal is.
Project settings picture
I have a problem that allegedly isn't possible, so I'm having a heck of a time finding an answer.
I have the latest version of NetBeans 7.4, running on fully-updated Fedora 20 x64. Officially, this can work with JavaFX. Period. I have both the JDK from the repo (1.7.something) and the very latest version I could find (1.8.0). Officially, these have JavaFX with them. Period.
If I try to create a new JavaFX project, it has this to say:
Failed to automatically set-up a JavaFX Platform.
Please go to Platform Manager, create a non-default Java SE platform, then go to the JavaFX tab,
enable JavaFX and fill in the paths to valid JavaFX SDK and JavaFX Runtime.
Note: JavaFX SDK can be downloaded from JavaFX website.
Well alright, I'm used to things getting confused, I think I can fix this. Go create a new platform, and... there's no "JavaFX" tab. It took a bit of research to even find out what it was talking about, and in the process I discovered that the tab has actually been removed from 7.4. Because NetBeans 7.4 will absolutely, definitely recognize JavaFX automatically. Period.
Going to the actual JavaFX site tells me, as expected, that it's bundled with the Java SE 7 JDK I already have. Period.
Since the end result I'm after could technically be achieved by integrating one JavaFX component into my Swing application, I attempted that, but NetBeans still can not find anything related to JavaFX and therefore yells at me if I try to import such a thing.
So, given that things that are supposed to just plain work just plain aren't... where can I go from here?
Currently in Debian and Ubuntu (probably others) JavaFX is a separate package from the OpenJDK (openjdk-8-jdk) and so needs to be installed:
sudo apt-get install libopenjfx-java libopenjfx-java-doc
Notable issue (this issue does not impact a Maven, JavaFX application so if that is your preferred build method then ignore the following issue):
If you try to create a new project:
Categories > JavaFX
Project > JavaFXApplication
You'll get:
Internal error. Missing resources [/resources/web-files/javafx-loading-100x100.gif]
/home/ken/NetBeansProjects/vestFxReports/nbproject/jfx-impl.xml:1465: The following error occurred while executing this line:
/home/ken/NetBeansProjects/vestFxReports/nbproject/jfx-impl.xml:3093: The following error occurred while executing this line:
/home/ken/NetBeansProjects/vestFxReports/nbproject/jfx-impl.xml:2055: Error: -includedt requires the java deployment toolkit, which is not included in this distribution
BUILD FAILED (total time: 1 second)
To fix the above error [following steps are derived from here: http://hongouru.blogspot.com.uy/2015/09/solved-error-building-new-project-using.html]:
Switch to the files tab (usually you're on the Project tab).
Expand the node for your project >
expand the nbproject node > open the "project.properties" file.
Find the line javafx.deploy.includeDT=true and change true to false.
Now you can create and run a JavaFX application, on OpenJDK.
Next steps, although beyond the issue at hand you'll probably at some point want to download the JavaFX scene builder: http://www.oracle.com/technetwork/java/javafxscenebuilder-1x-archive-2199384.html
Apparently, the issue is indeed a discrepancy between the open-source OpenJDK provided by most Linux distributions, and the proprietary Oracle JDK. Ironically, this is a well-known issue, but you have to specifically search for it to find it, and by then you already know.
The solution is to download the official Oracle JDK, and if necessary create the matching platform in NetBeans (located under /usr/java/jdk... at this moment). It should work perfectly fine after that.
Perhaps the official documentation
https://netbeans.org/kb/docs/java/nb_fx_screencast.html
https://netbeans.org/kb/72/java/javafx-setup.html
may help you to set it up
I am using VC++ 6. Don't ask why. It's just required.
My debug version is working fine. But release version was looking for a different version of OpenCV library and subsequently generated an error message "can't find cxcore100.dll" (correct one: 1.1, wrong one: 1.0) So I tried to find a reason while debugging it. So I set the "Generate Debug Info" in Link of Settings. When I run the release version, it does not generate the error message any more.
I don't think this is a good sign. What can be wrong here. Any guess or hint would be appreciated.
Then in the linker options for vc6 you are linking against cxcore100.lib in the release build and cxcore110.lib in the debug build. Just change them both to cxcore110.lib
ps although in more modern version of opencv there are separate release builds of the libs which end in 'd' - I don't remember what happened in v1