Coming from Eclipse world, I really miss this important feature where Eclipse suggests if particular package needs to be imported for compilation error
e.g.
new ArrayList , this simply says Can't resolve symbol
'ArrayList' but doesn't suggest which package to import like eclipse
does.
Is this bug with IDEA or some setting needs to be done in it ?
[Solution]
The problem turns out be bad UX from IDEA
If user does mouse over, it show error message as per above screen shot
If user puts mouse somewhere else; it suggests package to import sometimes. It's not as friendly as Eclipse though
I've posted answer in bottom part of question. IDEA has got confusing & not so user friendly UX which gives hints about package to import.
I find it more useful in Eclipse, hope IDEA team will fix this
https://www.jetbrains.com/help/idea/auto-import.html
Related
Kotlin Repl does not open ,nothing happens on clicking it
My solution/workaround. What happens is, and by the way the Intellij ide warns you about this, that you create the project and when naming it you use a space or similar unsupported character and the ide still seems to create the project just fine but actually it doesn't. Your project comes out misconfigured and you can't use Kotlin Repl. The simplest solution is to replace any spaces (or similar forbidden characters) with a hyphen "-" or an underscore "_" or simply use cammelCase. Best of luck to everybody and hope future learners of kotlin see this and spend less time troubleshooting such a simple issue.
Do you have a project open when you click it? This post states: "At this time the Kotlin REPL requires you to have a project open. You don't need to configure anything specific in the project; a Java project with the default settings will run just fine.
If you want to try Kotlin without configuring anything, you can use the online IDE at http://try.kotlinlang.org/"
I am trying to learn Kotlin by following the tutorial. I managed to get the plugin installed in Intellij. But I am not able to get the first exercise to run. When I click on the little checkbok it tells me
Failed to launch checking. See idea.log for more details.
(I created another blank project and type the same simple exercise in a scratch file and it works.)
link to docs
Try to check the project's is linked to the right JDK. Open File/Project Structure/Project. Then select the correct Project SDK.
To me, this helped. But as others have pointed out, please, share your idea.log, which you can find at Help/Show log in [whatever text editor it's associated with].
I've run into this problem several times when trying to import external libraries to run with a Power BI custom visual, and I'm not really sure what I'm doing wrong. This current attempt is recreating the Card Visual in the latest API, and it's been a painstaking effort that hopefully someone else can help me out with. I can't point at any one reason why this is happening though it appears to be caused by using statements like:
import valueFormatter = powerbi.extensibility.utils.formatting.valueFormatter;
and I get error, in the browser:
Unable to get property 'valueFormatter' of undefined or null reference
visualSandboxMinimal.html (626,17)
when I tried removing these things I instead run into the error:
HTTP404: NOT FOUND - The server has not found anything matching the requested URI (Uniform Resource Identifier).
(XHR)GET - https://app.powerbi.com/13.0.3328.205/visual.js.map;
I can't really resolve either of these errors, to make the project work. The project will build fine and display in the application, but not show any information. Something isn't setup with the API or the project where it just doesn't put the pieces together properly or something. I really don't know and there's so little information out there about this thing, that it's kind of like shouting in the dark at this point.
I am including the whole source project, hopefully so that anyone who can help will be able to, and if anyone wants to take my effort and build their own "Card" like Power BI visual: https://www.dropbox.com/s/9ks8u0v56eph8ul/cardWithConditionalFormatting.zip?dl=0 . This is based on the source available at https://github.com/Microsoft/PowerBI-visuals-core, specifically related to the Card visual.
If anyone figures this out, it would be a huge help to me, though I will continue to do my own research and if I find anything about it I will update the information here.
I figured out what was happening here, I had included the index.d.ts files in the tsconfig.json file, but forgot to include the index.js files in the pbiviz.json file and in some cases forgot to include the css files in the .less file.
Ver 14.1.1 Ultimate:
Can somebody please explain what is going on, what is the so special about crypto package mysterious behavior?
A. Mac class is unresolved according to editor.
B. SecretKeySpec is resolved only via .* notation and would give the same underscore red marking error if I would import individually the class.
C. I can run the method so it compiles?!
Glad I could help :)
IntelliJ has some hickups from time to time, in such cases I choose File -> Invalidate caches and restart. This is my first best shot at such kind of issues, and mostly the go away with that.
I just finished skating around that infamous "cannot load main class start" thing, and I got blindsided with a sea of errors:
A friend suggests it might have something to do with com.google, but ultimately can't help me.
I haven't made a single alteration to any of the code so far. Eclipse just started up not being able to run and stayed that way. I think there's a way to fix it but it would require making acute changes at the sight of every single error; work that could be wiped by a cleanup if I'm proved wrong.
Anyone have a clue what the issue is? Thank you for the trouble.
UPDATE: Adding guava as a library relieved the error involving com.google, but threw in a handful of others. This one class file contains 3 of the most common unresolved types I've seen scattered throughout: Logger/LogManagaer, PropertyMap, and CrashReport
Your general problems revolve around not having dependencies in the build path. Eclipse's error messages are pretty clear about this; e.g. if a package name is underlined in red and can't be found, then that means it can't be found, and the obvious solution is to add the library that provides it, so that it can be found.
In virtually all cases here, a Google search for the missing packages and classes will lead you to the packages that contain it.
For each unresolved dependency, find the library, add it to the build path, then move on.
I also suggest consulting the documentation that comes with the source code you are attempting to compile, which often simply lists the dependencies, thus saving you the trouble of hunting them down as you go.
While we could do the internet searches for you and hash this out one step at a time, it's both better and faster for you to do it yourself. Better because if you're messing around with Minecraft source, having at least a basic knowledge of how your tools work is going to help you (I also suggest some of the material at http://docs.oracle.com/javase/tutorial/). Faster because the turnaround time of typing package names into the Google search box is a heck of a lot faster than constantly updating your question here and waiting for replies.
It looks like you are missing the Google Collections package, which now is called Guava.
Download the jar file, and add it as a library.