Trouble getting my Android Studio application to run - java

I got this application to run previously, but since I clicked 'End Task' on Android Studio in the Task Manager in the middle of importing something, it's not working anymore.
deleted screenshot
The problem is in the screenshot above. The run button is greyed out. I can go to Run in top menu --> click Run, it throws up a box prompting me to edit configurations. I click on that, then click Run in the box it throws up, but nothing happens.
My java classes have a red icon next to them, whereas in other applications, they have a blue icon with a letter C. That looks to be the problem.
Anyone know what the problem could be? If you need more information, I am happy to give that.

Fixed: This was sorted out going to File --> New --> Import Project, clicking Next on each window, then 'Finish'. Then Run in the top bar, click 'Run', application runs successfully.

Related

Sometimes Netbeans disables the run button

Sometimes Netbeans disables the run button.Help me to overcome this problem.I can't keep restarting netbeans again and again.When I get this problem my clean button also get disabled.
Do Run -> Set Main Project and select your project.
To explain: netbeans is very context sensitive and you may be moving out of the context of your runnable project. In general, clicking any source window thats part of the project will enable the project's Run button but if you, for example, open some random text or csv file to take a look, the Run button will disappear because the text or csv file you're looking is not part of the runnable project -- you've moved out of the project's context.
Setting a project as Main will cause it to always be the 'in context' project with respect to the Run, Debug, Profile buttons.
As the comment mentioned, your app also might still be running and you should see a Stop button to press.

Eclipse Reads from a different class(file)

This problem continues to persist and I am hoping that someone who understands Eclipse can help.
Previously, I worked on a project that involved reading files. However, I am complete with that project and now my current project keeps reading the previous file.
I just want to run programs seperate from the personalityy.java file
I have already tried run -> configuration
Screenshot
It reads from personalityy.java
You're pretty unclear about what exactly you're trying to do, but in short, to run a java application, right-click on the source file in the explorer and select "Run As" and "Java Application".
It looks like you are new to Eclipse. Don't worry the problem is pretty simple. The Green run button on the menu bar will run the last run program by default. You probably have the new file open and you are using the run button in the menu to run. What you have to do is.
Open the file you want to run.
Right click inside the new file in text editor
Click Run as
Click Java Application.
In the future you can click the black down arrow beside the run button to select which program you want to run.

Ecllipse : Not able to see any file/Project

I installed Eclipse luna, Android SDK, ADT (all latest) & set up everything.
Even after re-starting Eclipse I don't see Welcome to Android screen. I can only see Welcome Screen. But the settings required for Android & Java were all set I believe so, so the installation might be done properly only.
I tried creating Android projects, on last dialog i.e. select Activity type, I select, click Finish ; the screen blinks and the same page is seen. I tried with variations (using different Activity type) & create 4 projects, can see the projects created, also the activity java file in src folder is created. But on Eclipse Don't see anything. But on top title, I see the project name.
Similarly to chk with I tried creating Java project, same thing. It seems somethign is wrong with Eclipse. Other than WElcome Screen I don't see anything. I even tried to open just a java file - file name is seen on top, but file contents not seen on screen.
Image of how I am creating project & its results :
After clicking Finish & Creating files, etc, again Step 5 is on focus and on back the Initial Welcome Screen is only seen.
If at all I click Finish again, then I get error that ApplicationName already exists.
See the Folders & Files created after clikcing Finish
The files, activity is created. So the Performing Changes has also done its work, but the view is lost ???
This is where I can't get what is happening & Why? What is going wrong here. I have only Android 5.0.1 API 21. I don't have 2.2 - Is that the reason !
Created Manifest File :
- - - -
Can someone please help me with this. I am stuck up and am in hurry to start working.
Any help is highly appreciated.
Thanks
Have you tried reset perspective? (Window -> Reset perspective)
Thanks to all. I got it solved.
I saw 2 icons on the top left below menu bar. On clicking that I could see the project explorer & other windows. And finally closed the Welcome Screen.
Thanks a lot for everybody's effort to help me solve my problem.
Thanks once again.

configure gnu.io.rxtx.properties android

When I try to run a new, blank android project in the latest eclipse SDK a window pops up that says "configure gnu.io.rxtx.properties". (It's the one with 128 check boxes representing 128 serial ports)
When I select some ports and click save, an IOException appears in the console window and nothing else happens.
The project will not run. The window will not go away. How can I fix this problem?
Silly mistake, for some reason 'configure' was set to run and not my project.
Right-click, run as, android. solved.

Running a project in NetBeans?

In Eclipse, running a project is as simple as clicking the run button.
In NetBeans, I'm totally confused. How do I run the program? If I print something, where does it go (e.g. the console in Eclipse)?
Thanks!
EDIT: Solved it. For some reason it was running a different application than the one I had selected. Anyone know why?
It's the same in NetBeans, just klick the "Run" button (you need to have a main class defined though)
The output goes into the "Output" window which is displayed at the bottom of the editor by default.
If you don't see the output window, you can display it using the menu "Window -> Output -> Output"
In the menu, see Run > Run to run a project.
On the bottom right, find the output windows, that's where the print will appear.

Categories

Resources