I'm trying to follow the Android Development Tutorial - this page: http://developer.android.com/training/basics/firstapp/running-app.html
I am stuck - I cannot run the application. The instructions say "Open one of your project's files and click Run from the toolbar." However, there is no "Run" button on the toolbar, and there is no obvious option to choose from the "Run" dropdown on the menubar (see screenshot below).
Further down on that page, the instructions say "In Eclipse, click Android Virtual Device Manager from the toolbar." That button is also not there!
Am I missing something really obvious? I am on the Java perspective, and I have tried "Window -> Reset Perspective", but I am unable to run the application.
Any help would be appreciated.
EDIT: Under Window -> Customize Perspective -> Menu Visibility, I only have this - ticking Run unfortunately doesn't add anything - nor does ticking Launch under "Toolbar Visibility", when I try that I get the error Launch cannot be made visible because it is in the unavailable null command group. Would you like to switch to the Command Group Availability tab?.
You can add it like Window -> CustomizePerspective -> Menu Visibility -> Run -> Ok
or still can run your project by
Right clicking on your project which you want to run from the project explorer and select Run as and then Android application....T daaa...
If still the problem is there check
The "Run As -> Android Application" is no longer an option in my Eclipse Run Configuration
"Run as" android application is missing
Window -> Customize Perspective -> Toolbar Visibility -> tick Launch -> Press ok
Window -- > Open Perspective --> Java
If the entire toolbar is missing then you can use
Window -> Appearance -> Show Toolbar
Don't modified BuildConfig.java file,that file is generate by android sdk.
You can download android Tutorial video help youself improve.
Related
I don't know what I did with one of my "toolbars" on NetBeans and now its hidden.
I want it to be displayed again.
This is the toolbar that I want to be displayed:
You have to re-activate it in menu -> view -> Show Editor Toolbar.
Check that option and the toolbar should be displayed properly again.
There are more ways to do it, but this is the easy way.
If you have a faulty toolbar (or you're missing the main one) and cannot access the Window -> Reset Windows function go to:
..\AppData\Roaming\NetBeans\8.2\config
and delete the Windows2Local folder (this one is for 8.2 version, but should be similar). Then restart the IDE.
OS: Windows 7 x64; Eclipse IDE for Java Developers (Juno SR2)
I am following tutorial from a book for devlelopment of Eclispe plugins. At one point I made a mistake so I decided to delete whole project (I selected "Delete project content on disk (cannot be undone)"). So I started fresh. But then, after just few initail steps: File -> New -> Other -> (Wizard) Plug-in Project, Next, Next, selection of Hello, World template, -> Finish when I run project it was supposed to get button on the toolbar when Testing -> Launch an Eclipse application is executed.
But this time there was no buton at all (Eclipse launches new instance of Eclispe). Also, I couldn't find it in Customize Perspective -> Choose which tool bar item to display (it should be under Sample Action Set).
After few failures, including erasing "runtime-EclipseApplication" folder on disk, I created new project, named just "Hello World", and this time it works OK, the is buton on toolbar, and there is item "Sample Action Set" in Customize perspective, and there is even "Sample Manu" on Menu Bar. Now, even if I start HelloWorldProject it also has a button and menu item etc., i.e. it works as it should.
But, if I now delete HelloWorld, then even HelloWorldPlugin reverts back (!) and now (when test instance Runtime WorkBench is started) it again don't have button and menu bar?
What gone wrong and how should I fix it? I mean this is just an example, I can just go on with another project name, but in real production environmet if I have strict specification I can't get out so easily, and that is why I would like to know what happend and how to fix it?
I found how to fix it, but I still don't know why it happened on the first place and especially why it persisted, even after several complete deletes of project?
The fix is: Run -> Run Configuartions ->Plug-ins tab -> Workspace -> (select) HelloWorldPlugin.
I have just downloaded the "Eclipse IDE for Java Developers" (version: Kepler Service Release 1 for Windows 64bit) and extract it to a folder.
The Package Description says that the IDE includes WindowBuilder Core.
So I created a New -> Java Project using the default settings and pressing Finish. Then I created a new class file with a public static void main() inside it.
Then I search all the toolbars but I can't find the WindowBuilder Toolbar anywhere so that to be able to create a new window..
How can I access the WindowBuilder Core from my Eclipse and show up the toolbar with buttons and textboxes e.t.c.?
How can I make and run a simple window with WindowBuilder?
I found the second part of my question my own, sorry for any inconvenience.
1) How can I make and run a simple window with WindowBuilder?
As lakshman said,
Go to File -> New -> Other. The "select a wizard" window pops up.
Double click in WindowBuilder folder and then to Swing Designer subfolder.
Click to the Application Window and then click Next.
Give a Name for your new window and then click Finish. The Source code of the new Window pops up.
Press Run (the "Play" icon of the toolbar) to run your newly created window.
2) How can I access the WindowBuilder Core from my Eclipse and show up the toolbar with buttons and textboxes e.t.c.?
To access the core WindowBuilder you have to switch to the Design View of your newly created window. To do that, just press the Design tab at the end of the window tab. You will see the core WindowBuilder Toolbar (or "Palette") and you will be able from here to drag-n-drop the controls you want into you window.
Go to
File--->New
New----->Other
Select WindowBuilder
WindowBuilder----->Swing Designer
Swing Designer---->Application Windows(Click)
Application Windows---->Next
And Now Give the name and your WindowBuilder is ready
Right click on the class -> Open With -> WindowBuilder Editor
Use File-->New-->Other to open the "select a wizard" window. Then type window in the search field at the top, which will show Window Builder wizards. Then select Application Window.
Give a name in name text field. Then you have created a simple project. Right click the Java file from Project Explorer and select Run as... --> Java Application to run the generated app.
I was following the tutorial that came in the Eclipse editor (click Help -> Welcome -> Tutorials). I worked through all the steps which were:
This cheat sheet shows you how to create a "Hello World" application
that uses the Standard Widget Toolkit (SWT). The application will
simply display an empty window to the user. If you need help at any
step, click the (?) to the right. Let's get started!
If you're not already in the Java perspective, in the main menu select
Window > Open Perspective > Java or click on the "Click to Perform"
link below.
Open the Import wizard from the main menu via File > Import..., and
select Plug-in Development > Plug-ins and Fragments. Click Next. On
the Import Plug-ins and Fragments page, select Import from: The
active target platform. Plug-ins and Fragments to import: Select from
all plug-ins and fragments found at specified location. Import As:
Projects with source folders. Click Next. On the Selection page, Add
org.eclipse.swt.{platform}.{os}.{arch} (for example:
org.eclipse.swt.win32.win32.x86 for win32) to Plug-ins and Fragments
to Import: list. Click Finish. This will create the
org.eclipse.swt.{platform}.{os}.{arch} project which we will need to
compile and run the application.
Now we need a project to store our own source code. In the main
toolbar, click on the New Java Project button, or click on the link
below. Enter HelloWorldSWT for the project name, then click Finish.
Since our project requires SWT, we need to specify this in the project
properties. Right-click on the project and select Properties. In the
Java Build Path page open the Projects tab, add the
org.eclipse.swt.{platform}.{os}.{arch} project, then click OK.
The next step is to create a new class. In the main toolbar, click on
the New Java Class button (or the link below). If not already
specified, select HelloWorldSWT/src as the source folder. Enter
HelloWorldSWT for the class name and select the checkbox to create the
main() method, then click Finish. The Java editor will automatically
open showing your new class.
In the Java editor, enter the following Java code in the main()
method: Display display = new Display(); Shell shell = new
Shell(display); shell.setText("Hello world!"); shell.open(); while
(!shell.isDisposed()) { if (!display.readAndDispatch())
display.sleep(); } display.dispose(); You will get compile errors.
Right click in the Java editor and select Source > Organize Imports,
then save your changes.
To run your application, right-click on your class in the Package
Explorer and select Run As > Java Application. A new empty window
should appear with the title "Hello world!". Congratulations! You have
successfully created a Hello World SWT application!
And here's a screenshot:
But when I tried to run the program, instead of displaying a blank screen as expected, it dumped this in the terminal:
Exception in thread "main" java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons:
no swt-cocoa-4233 in java.library.path
no swt-cocoa in java.library.path
Can't load library: /Users/devenkelling/.swt/lib/macosx/x86_64/libswt-cocoa-4233.jnilib
Can't load library: /Users/devenkelling/.swt/lib/macosx/x86_64/libswt-cocoa.jnilib
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:331)
at org.eclipse.swt.internal.Library.loadLibrary(Library.java:240)
at org.eclipse.swt.internal.C.<clinit>(C.java:21)
at org.eclipse.swt.widgets.Display.<clinit>(Display.java:101)
at HelloWorldSWT.main(HelloWorldSWT.java:11
I'm using an x64 system with the 64-bit Eclipse installed and both 32-bit and 64-bit versions of Java (I think). Please help. Thanks.
Source: Eclipse Forums
This worked for me:
Right-click on your your project folder HelloWorldSWT;
Go to Properties -> Left Sidebar Java Build Path -> Tab Projects;
Expand the org.eclipse.swt.cocoa.macosx.x86_64 folder by clicking on the arrow left to it;
Select Native library location and click Edit;
Click the Workspace button and select org.eclipse.swt.cocoa.macosx.x86_64;
Click OK a couple of times;
And you're done! Hope this helped.
How to do that? I can't find any option for it in the IDE... Please help me, I'm clueless.
Run your app in "debug" mode
Modify your .java files and save them
Click on the "Apply Code Changes" button that appears on the toolbar (it looks like three linked green rectangles, or Tools -> Options -> Java -> Java Debugger -> General -> Appl code changes after save)