Android application failed to run - android

My issue is that I never be able to run my android application in Emulator or in a real device.
I have eclipse Helios as
Eclipse IDE for Java Developers
Version: Helios Service Release 2
Build id: 20110301-1815
(c) Copyright Eclipse contributors and others 2000, 2011. All rights reserved.
Visit http://eclipse.org/
This product includes software developed by the
Apache Software Foundation http://apache.org/
Latest SDK and proper AVD are configured. But the issue is while creating an application.
I follow these steps
1) File > New > Android Application Project
Here a diaglog box appears where I put application name etc, The finish button is disabled in this step.
2)On clicking next the "Configure Launcher Icon" dialog appears, here too the finish button is disabled
3) In the third step "Create activity" dialog appears, here also the "Finish" button is disabled.
I select "blank activity" from the list box and click next
4) On the fourth step "New blank Activity" dialog box appears as shown in the figure.
After entering something in the hierarchical Parent field, the finish button gets activated. After clicking finish the application skeleton is created.
Now, when I run the application, I face either two issues
1) Sometimes it says that there is an error in the project and ask to fix that
2) If it runs, the emulator appears and nothing about the application being run.
I downloaded the apk file and installed in my Samsung Galaxy S2, But the open/run button is disabled there.

Yes, i met the same problem.I did as other said just checking updates,but nothing was found.Then I reinstalled ADT plugins using https://dl-ssl.google.com/android/eclipse/,and ADT version was updated from v20.0.0 to v20.0.1.All the problems were solved.

Give the name u want in hierarchical Parent feild
Go to AndroidManifest.xml need an "android.intent.action.MAIN" for start.
add
action android:name="android.intent.action.MAIN
category android:name="android.intent.category.LAUNCHER

Related

Unable to install the SDK tools, finish button is disabled

I am trying to install the SDK tools for Android, i clicked on "Accept" but finish button is disable, how to get out from this problem?
here is the snap of what i am doing!
You need to accept the license agreement for each and every License displayed on the screen. Once all license agreement is accepted it won't display in bold and the Finish button will be enabled.
Solution:
Try to install 2 tools in parallel, not more than 2, if u try to install more than 2 tools this will create this problem.
I guess the possible reason is that you have to wait because packages are getting download. Once the packages downloaded then you will be able to click on finish button (only a guess, it might be the possible reason. I solved the problem by "manually downloading" the sdk using terminal which I explained below).
But I had a bad internet connection, so, my computer was just get stucked. And I have to download them one by one on my compter.
For manual installation of SDK watch the following video -
https://www.youtube.com/watch?v=c7_JxGX8oxc
At the end you have to add "Android SDK" in the "Android Studio" for that do the following -
Open android studio
Click on "Customize" on top left corner
Select "all setting..."
Go to "Appearance & Behavior" -> "System Settings" -> "Android SDK"
Now, find this line -
Android SDK Location: Edit Optimize disk space
Click on "Edit"
It will open an popup window, it will again ask for "Android SDK Location:" (or it will automatically sense it), to fill the location click on "folder icon", locate downloaded android SDK folder. It will sense the recent available updates, slect them if you want to download them
Then keep clicking on "Next" untill it start downloading packages
Once all stuff is done, "THE FINISH BUTTON WILL GET HIGHLIGHT, YOU CAN CLICK IT NOW, AND BE HAPPY, THERE IS NOTHING WORNG WITH YOUR LUCK 😅"
By the way, I just started Android Development. I am pure noob. So, if something is wrong feel free to correct me :)
You have to scroll down to the end of the license text and then click on "Accept", for all the root items in the right column.
I faced the same problem, then I clicked on all the sdk options and checked whether all were accepted or not. The last one was not accepted, so I accepted it and the finish button was enabled.
You have just to accept the license for every component, even for those you don't need to install
If you select accept for each license on the left, the problem may be solved. This method worked for me.

Android SDK path not specified

I already installed the android studio but i am having a problem to proceed ahead,
and the problem is Android SDK path not specified, what does it mean, do i need to download something or what?Android SDK is having problem
Go through the following steps but first make sure your PC is connected to the internet.
Open your Android Studio
Go to the File menu and choose Settings
After that from the left side of Settings window search Android SDK, click on it and on right side click Edit.
Then from SDK Setup Window Click Next and Another window will be opened click Next.
Finally, the installation starts and Android Studio download the SDK and necessary files.
Yes, you need to download the Android SDK. Then you need to add the location on your computer to Android Studio.
The SDK can be downloaded by opening a workspace in Android Studio, and finding a button with an arrow pointing down. If you hover over it, it should say "Open SDK manager". Press it and download the packages you need.
Yes, Before installation it will ask you options.Just tick mark Android SDK.
See below:
Refer link: https://developer.android.com/studio/install
The installer is misleading making you think the SDK is already there. After much searching I figured this out:
Cancel the dialogue box asking for the Android SDK path and do the following:
Open Android Studio IDE. Find the down arrow icon, should be second last icon in the toolbar. Click that. You will see a path for Android SDK Location:. Click the edit link to the right of that. This will bring up the SDK Components Screen. If you can check the boxes there, check them. They may already be checked or they may be disabled. You can leave the path as is, for me its:
C:\Users\<user name>\AppData\Local\Android\Sdk
Depending on whether you had Android Studio before it may say it has detected a previous version and it will only download the components it needs. This is normal. Now click the NEXT button. A confirmation screen will come up with Setup Type and SDK Folder. If you want to change your SDK Folder this is your last chance, if not, click NEXT again.
It may bring up a Terms & Conditions screen, click the Accept radio button then NEXT. It will go and download the Android base SDK. When it's completed click FINISH.
You will then be taken to the Platforms screen where you can select which Android platforms you want to support. ie, Android 9.0 (Pie), Android 8.1 (Oreo). Select all the platforms you need then click APPLY.
The downloader will grab all those packages for you. Next, click the SDK Tools tab. Check the boxes of the tools you want and click APPLY. It may bring up a Terms & Conditions screen again, click the Accept radio button then NEXT. When completed just click FINISH and you're good to go.
File > Settings
The download will begin
In some cases, the project works properly but suddenly this error appears even though the project has nothing to do with Android
If this is your case, try the following steps:
Find a file in your project called tests.iml (or File ending in .iml)
file location in default is C:\yourProject\tests\tests.iml
Revert to the last version for all page by the click on the git change icon (1) and click on the revert button (2)
As the following image:
Run project

How do I see gradle tasks run by Android Studio?

I'm following the course "Developing Android Apps" on udacity.
I have a problem on Lesson4A with the test suite (TestUtilities) complaining "Task 'cleanTest' not found in root project 'Sunshine'.
And then it points me to run with --stacktrace option.
But I don't know how I can run the command on the terminal in the first place.
How can I see what gradle-tasks that android studio is running?
Thanks :)
At the bottom right corner of Android Studio you have different views:
Gradle console
Event Log
Additionally, if your Gradle is running, will appear a 3rd one where you can see a progress bar with some information about the process. But if you want a full details use the 2 first views.
I believe you have not do the configuration at first, as the default configuration is not appropriate for this project.
Select Edit Configurations next to Run button on toolbar
Make a testing configuration, by click the + button and select Android Test.
Make sure you choose "Show Chooser dialog" in target device section if you are using Virtual devise like Genymotion
Hit OK and press the run button.
PS. Make sure your have this configuration under Android Test, and nothing under JUnit dropdown.
I was confused at first, but not anymore after I tried above steps from Udacity notes.

Intellij "Run as Android application" missing

The emulator android is really running slowy, and I found Genymotion and runs really fast! And when I tried to use with Intellij, after I followed every step from this doc https://cloud.genymotion.com/page/doc/, I got stuck in this item:
In your application project, right click and chose "Run as Android
application" The "Android Devices Chooser" opens Click on the
Genymotion virtual device you started/created
I really can't find "Run as Android application" whenever I click on my folder project, where I'm missing?
Look at this image, I really don't know why.
http://i42.tinypic.com/2ia76rl.png
In IntelliJ inside the Run/Debug Configuration dialog (available under Edit configurations...) you have to select radiobutton "Show chooser dialog" instead of Emulator.
Then you just press Run and you get the list of running devices.
If you select "Use same device for future launches" in the configuration dialog, you won't have to select the device again next time.
Check the toolbar of Intellij. There is a drop down menu (next to it are the "play" button and the "bug" button to start the debugger). You need to setup an Android configuration for your project first.
Check this site
http://www.jetbrains.com/idea/webhelp/creating-and-editing-run-debug-configurations.html.
Although I have a configuration for my project, like you I can't see it in the menu your screenshot is showing. But I can use the mentioned run button to run my project without any problem.
Good luck.
On your screenshot you have a "Run" item on the options. Look at what appears when you let your mouse over it ;-)

No ADT plugin options available

I'm running Ubuntu 10.10 and installed Eclipse 3.5 (Galileo) for Java Developers along with the Android SDK. When I add the following URL into the work With field under Eclipse's Install New Software menu:
https://dl-ssl.google.com/android/eclipse
No plugins appear between the "Work With" and Options sections. I understand I'm supposed to be able to select Developer Tools. I get nothing. I've tried linking to http vice https. Also, downloading the zip from the android dev site itself yields the same result. When I run Check for Updates, it comes back saying nothing to update. I also ran "Test Connection" for the above URL and it comes back positive.
Any advice?
I think that is an Eclipse visualization bug: try to resize the dialog window as it appears minimized
Click the "Add..." button to the top right. Then enter the name (I just put "Android") and location (https://dl-ssl.google.com/android/eclipse). At the right side of the work with field there is an arrow that brings up the list of sites. Clicking Android adds the Developer Tools item to the list below. From there you can expand it and check whatever you need.

Categories

Resources