IntelliJ can't find any LibGDX packages? - java

I have just switched to Ubuntu and I've installed IntelliJ IDEA 14 Community Edition. When I imported my existing project, I found that IntelliJ can't seem to find any of the LibGDX dependencies. I installed Gradle beforehand. I've tried using the Gradle wrapper included with the IntelliJ project to and saying ./gradlew --refresh-dependencies, but this doesn't seem to do much of anything. My external TweenEngine packages were loaded just fine. It seems to only be with the LibGDX packages that IntelliJ is having a problem with. I do not wish to have IntelliJ see my project as a Gradle Project, as then it will have to sync. I prefer to do things myself in that regard.
My guess is that Gradle isn't installing the LibGDX dependencies, but I'm not entirely sure why that would be happening. Shouldn't ./gradlew --refresh-dependencies install them? The errors I get are all the same as this one, just with different package names and different line numbers:
Error:(7, 24) java: package com.badlogic.gdx does not exist
The line numbers correlate to my LibGDX class imports, so this is what leads me to believe that Gradle is not installing the dependencies.
When I imported the project, I selected the build.gradle file. I have the local.properties file pointing to a valid Android SDK.
If you want a specific look at the project and would like more detail than I have provided, feel free to check out the source code: http://bitbucket.org/Sonic2kk/mr.-ballguy/
What could be causing these errors and how can I correct them?

Try installing the android sdk. If that doesn't work, try reinstalling IntelliJ.
Also, try linking your IntelliJ project to IntelliJ's Gradle plugin.

Related

Exporting Eclipse plugin not able to see project as plugin project

I am working on Eclipse plugin. At the beginning exporting of it worked fine but I guess that after updating Eclipse it broke down. Eclipse started to mentioned that I have uninstalled some equinox packages. It took time till I understood that version of Eclipse made a problems and I reinstalled older version of Eclipse. Now I am again able to run sample environment with plugin but I still am not able to export plugin. In export form where I need to select deployable plugin and/or fragments I don't have listed anything. From what I found I understand that it might be problem with importing project in Eclipse as it might not remove information that project is external and thus not listing as project that could be exported. But I did not find any way to prove this case.
Is there anybody having any idea how to solve this kind of issue?

IntelliJ can't load Maven dependency

I'm using IntelliJ IDEA Community 2020.2.3.
My project is built around Kotlin 1.3.30 and Java 11.
I've upgraded one of my dependecy to java 11 too, and after that, the IDE shows the dependency under "External Libraries", it build the app without errors, Maven build it from terminal without error, but the IDE shows unresolved references on each occurrency of the classes, functions and imports of that library.
I already tried to empty the cache or deleting idea files and importing again the project, but none of those worked.
Any tips?
You can use CTRL+SHIFT+A and look for Load Maven Changes or CTRL+SHIRT+O to do the same thing

Gradle IDEA Plugin can't find JDK on Mac

PLEASE NOTE: THIS IS NOT A DUPLICATE. I want Gradle's IDEA plugin to correctly configure my IntelliJ IDEA CE project for me. I am not interested in any solution that involves manually tuning IntelliJ to find my JDK. This is a Gradle IDEA plugin feature that can and should work.
If you can find another question that involves correctly getting the Gradle IDEA plugin to configure IntelliJ (running on a Mac) so that it can find JDK 8+, then please by all means, mark this as a dupe and provide a link to that question. Otherwise, do not vote this as a dupe (it's not!).
Mac 10.9.5 here. Java 8 is my default JRE/JDK, and I just installed Groovy 2.4.6 and Gradle 2.13 via sdkman. I then installed IntelliJ IDEA CE.
On my terminal, I created a test-proj directory, and then inside that directory I issued the following Gradle command:
gradle init --type groovy-library
Gradle executed successfully, giving me a Groovy project skeleton. I then edited the generated build.gradle to contain the IDEA plugin:
apply plugin: 'idea'
And then I ran:
gradle wrapper
./gradlew clean idea
This generated the Gradle Wrapper for me, and I then used the IDEA plugin to generate IntelliJ project files for me. I then opened my brand-spanking-new IntelliJ IDE and went to Open my test-proj.
The project opened and everything appeared to be OK. But then I started coding and noticed that JRE classes such as String were not showing up as resolvable. So I went to File >> Project Structure and see this:
So it appears that IntelliJ can't find my default Java 8 JDK. I know the OS can find both the JRE and the JDK, based on the console ouput of java -version and javac -version. But something, between sdkman, Gradle or IntelliJ is preventing the IDE from finding Java. Any ideas?
I had the same problem, although i got it running by removing the .idea folder and reimporting the project by pointing to my build.gradle file. In the import dialog i selected the .ipr structure instead of using the idea "folder based structure" (default)
When executing gradle idea it will then generate an .ipr file in your project root configuring your project.
In my case the jdk was set properly and my modules were initialized correctly.
The reason behind using the .ipr files is, that the gradle idea plugin can't work with the directory based structure. See also:
directory based idea project with gradle
https://issues.gradle.org/browse/GRADLE-1041 (open for 6 years now)
Since i figured this out today i'm not sure how good this is working. Or what are the differences between directory based and .ipr based (.ipr based seems older?).

IntelliJ SDK for Plugin cannot find com.intellij.tasks

This must be a painfully simple question but I am new to IntelliJ. I am running 14.1 community, and created a new plugin project.
This asked me to set the SDK, which is install of IntelliJ. No problem, I pointed it at the IDEA directory.
I grabbed some example source for creating a task repository from github.
When I try to import any of the actual classes in the Task jar, I get no classdef errors all over.
It shows that it knows about com.intellij.tasks but all of the classes are missing.
What rookie mistake have I made?
In order to use com.intellij.tasks.* classes in plugin project, I've added plugins/tasks/lib/tasks-*.jar jars from IDEA installation to the classpath of SDK used to build plugin project.

Can't run imported gradle android project in Eclipse

First, im new in gradle so please bear with me.
I successfully build and imported this project with gradle & eclipse on ubuntu 13.10. This is what i did :
run gradle build in terminal (success)
add apply plugin: 'eclipse' in the build.gradle
run gradle eclipse in terminal (success)
import it as existing project on eclipse
The problem is, when i tried to run the project, eclipse read it as "normal" java program, not the android one. This is the SS :
The main project in my workspace is not in eclipse format.
And this is its properties :
Notice there's no android tab in it's properties. And i cant run it as android application.
Am i missing something? Please kindly help me.
Thanks for your help.
Usually to develop Android in Eclipse you need to install ADT into Eclipse or start with ADT-Bundle (Android IDE) from Google. (You have not as Preferences missing Android group)
However ADT does not have gradle support. And Android Studio is still not even yet beta (preview or alpha, bleeding edge, need to update with almost every build).
There is Nodeclipse/Enide Gradle for Eclipse
(marketplace), that lets launch gradle build even on general project.
For the latest build.gradle template for classic Android project check
gh.c/N/n-1/b/m/o.n.e.e.g/docs/android/build.gradle.
This lets create new Android project in Eclipse with ADT and use ADT tools for most of things,
but additionally have newer build with gradle
and execute defined gradle tasks
But for Android project with several modules (as in this case) you would need to DIY do it yourself:
try to configure Eclipse .classpath to correct values, as gradle eclipse task won't yet do it all for you.
Eclipse plugin in Gradle that you have used does not support Android projects - they are significantly different from regular Java projects. Some things can work but there will be a lot of things missing including Android nature for generated projects.
And the ADT plugin provided by Google does not support Gradle projects yet as the team focuses on Android Studio first. http://tools.android.com/tech-docs/new-build-system can give you some ideas about the current state.

Categories

Resources