vscode can not use for native module? - java

I using react-native. When I implement native module, it pops up errors window all the place like "The import android cannot be resolved (Java)" when I import something like android.widget.Toast.
The code still run well but it cause very hard for me to developed. Any tips?

Open a new XCode window with the directory being the android folder, using code android when you are inside the react native folder. I am able to get autocomplete, intellisense and autoimport in this window.

maybe you can try to delete the caches of the project. as it was storaged under:
"C:\Users\UserName\AppData\Roaming\Code\User\workspaceStorage".
many folders under it, as a folder correspondence a project, delete the correspondence folder of this project(as you can identify it through the 'modified date').

Related

After creating android project in Eclipse ADT, tons of errors show up

I'm using eclipse ADT (most recent version) to develop some android apps. I've followed the getting started tutorial at the dev.android.com and it worked just fine.
But when i tried to create another project with the same targets and sdk's, i've got nothing but errors:
Some errors and my sdk's:
That's the same sdk's i used before these errors started showing up.
What can be causing this?
EDIT: my project won't generate the R.java file
You might need to add a support library to your new project.
Check this link for downloading the support libraries -
http://developer.android.com/tools/support-library/setup.html#download
Please notice that you need to import them into your eclipse and then include one (preferably the newest, not sure about this) in your project.
EDIT:
Before downloading the support libraries you should first check if you have them already.
Try this, right click project folder in the eclipse package explorer, Properties>Android>Library>Add>select a library if you have one.
There might be an invalid library included in your project already, if that happens then you will see it in the Library>Add> menu, remove it and add a new one.
You might have clean your project ........
if yes.....you must check whether R.java file is present in **Project(your project)->gen->package name->R.java**
if not than u have to update Tool Folder in SDK manager

How to up and run java code in JasersoftStudio?

I would like to know something if possible. As I used JaspersoftStudio, I noticed that when creating new project folder it always came up with JRE library. I also see java editor in there as well. Is it possible to write and run java code in JaspersoftStudio GUI?
Please share your ideas on here.
Regard,
Sakura
As you may have noticed, Jaspersoft Studio is a repackaged eclipse. And yes it is possible to run Java code in it, it's just a bit more cumbersome than in vanilla eclipse.
In any of your jasper projects (the project icon in the explorer should have a little J), right click and open Properties.
In Java Build Path, add a new source folder.
In your new folder, create a new File, and put your main class in it.
You can now run it with the keyboard shortcut Alt-Shift-x j. I don't know if there's a menu for that too.
Additionally if you have an existing eclipse project, you can import it directly into Jaspersoft Studio using Import... Existing Projects into Workspace.

Importing PhotoView?

Ok so I want to chisbanes PhotoView.. I'm pulling my hair out now, Been staring at the screen for over an hour and for the life of me, I cannot figure out how to get this to even import into eclipse.
I've downloaded the git so I have my PhotoView-master folder with plenty of things in there (Looks like a project tbh). But no jar?
I came across this question which was marked as answered but I simply could not figure this one out.
Android : import libraries Like PhotoView
I went through this
http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject
But once again, there's nothing even available for me to add.
Anyone know what I need to do to actually get this loaded into eclipse and ready to reference?
Cheers in advance
Ok so I managed to get it working after hours slaving away at the screen.
First you need to move everything under the java/uk folder to the src/ folder in Eclipse. Once you do it the src/uk/... should look as normal. Next you need to go the project properties, click on Android and then change the Target Build Path to match the project you will be importing the library into.
Then just follow the instructions on the android dev webpage and then you should be able to reference the required files.
Working with library is a pain in android.
Photo view is not a jar library it is a referenced library. so you have to download the zip and import it inot ecllipse. Also if the library is built using Android Studio then you have to change folders to make it work. For eg the source code in Android Studio is in java folder while in ecllipse it is in src.

Problem in compiling java project in Netbeans

I have a problem now :
When I want to compile my project in Netbeans IDE I had this message error :
Problem: The project uses a class library called "toplink", but this class library was not found.
Solution: Click Resolve to open the Library Manager and create a new class library called "toplink".
In fact I didn't change anything and it works fine before?
What's the problem?
It seems that you have to import the library itself.
On the left pane in your Netbeans editor, you should have a series of panes. One of these is called the Projects pane. If you click on it, you should be able to see the files and packages which make up the project you are editing as nodes. One of these nodes, at the very end is called "Libraries". Right click on this node and select "Add Library". From there, you should be able to browse and locate the library.
I believe libraries are defined for the NetBeans installation rather than for the project. You can import a library into a project which would make it available on other NetBeans installations. Perhaps you are on a different computer or a new installation of NetBeans?

Configuring Netbeans with JNotify

I'm trying to use the JNotify library along with netbeans, however I don't know the proper way to configure it. Everything I try, the lines involving jnotify (eg. import net.contentobjects.jnotify.*) are underlined in red. Google seems to show nothing helpful regarding netbeans with jnotify, although I assume it's something simple like adding it to the classpath. I've tried adding the .jar as a library for compile & for run, no go.
The line i've been provided for running my app from the jnotify page:
-cp jnotify.jar -Djava.library.path=.
should I be using this as my compiling options or VM run options or both? seeing as I don't want to have to distribute my app with a .dll or .so file or the jnotify .jar.
Everyone on this site recommends using such and such a library, but they don't realize how hard they can be to set up (jnotify,boost,curl), and most who recommend them have probably never even used them themselves.
You're right, you have to add every library you use in your programs, into the projects classpath:
Click on the project node in your 'Projects' window. It should by default have a node called 'Libraries'.
Right click this node and select 'Add JAR/Folder'
Locate the JNotify.jar on the file dialog and press 'Open'.
Refresh your project, or just give netbeans some time to rescan the classpath, and you should be good to go.
There definately is something wrong with your classpath. While the above is exactly how you set the classpath when running a Java program, its different for a NetBeans project.
Follow these articles on how to add extenal jars to a NetBeans project.

Categories

Resources