I had a project named "xxx" which I renamed to "yyy". The project works fine on my phone. But Eclipse still says "Launching xxx" when I run the app. How do I remedy the situation? I've tried searching for "xxx" throughout my project, no luck.
I also had this problem on my Android project. Now I found the solution:
Click the down arrow next to the run button.
Select the Run Configurations item in the popup menu.
Expand Android Application and select the item with old project name.
Set the Name: field at right to the new project name.
Click Apply
Hope this can fix your problem.
Go to the launch configurations and have a look at the configuration that´s called xxx.
In the Name field you can edit the name of the launch configuration to whatever you want.
EDIT:
Maybe this documentation article makes it much more clearer:
http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.jdt.doc.user%2Freference%2Fviews%2Fdebug%2Fref-editlaunchconfig.htm
Related
Android Gradle Lock File Exception
I am working an Android project and i am using Kotlin for development , İ did some changes and closed the project and other day when i come and open the Project again , i got issue like this
Could not create parent directory for lock file C:\Program Files\Java\jdk-19\wrapper\dists\gradle-7.4-bin\c0gwcg53nkjbqw7r0h0umtfvt\gradle-7.4-bin.zip.lck
I have searched lot of site and i found nothing ,
There was a same question in the Stack Overflow but answers doesn’t work so i create again for,
If you have time and could give me some solution or ideas , i will so glad , thank your time
Enter this menu
then in the SDK Location menu as shown in the screenshot
you press the place where there is a red line
When you enter this menu, select the location where all versions of Gradle are stored, then in the "Use Gradle From" field, select what is in the screenshot
I figured out ,
the solution is run as administrator ,When you do it problem goes away
It just happened right after upgrading to v2.2, where androids studio is showing the full package name of the project for each package I create!
Anyone has any idea how to hide the full package name and just showing the package name the I am creating?
This is because you have the Flatten Packages option active. To return to the default behavior you must turn this option off by going to your Project view at the left side (usually) and then on the click Show Option Menu Icon (a little cog on the top of this sidebar)
Image guide: http://imgur.com/a/sEFxm
EDIT: Sorry it seems I cannot yet post a comment to a reply ?
There is currently a bug issued here about the same problem fairly recent
https://code.google.com/p/android/issues/detail?id=222914
They suggest that the bug has to do with enabling dataBindings in your project and they already looking for a fix to this as we speak.
On the other hand if you do not have dataBindings enabled please try the following: Close AStudio, remove the .idea folder from your project, and then import your project again.
It has been Fixed in Android Studio V2.2.1.
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.
I have updated eclipse,but after that,When I click the "Run " button, I get the following message.
"The selection cannot be launched, and there are no recent launches."
I have searched a lot and cannot correct the error..Pls help me..
Thanks in advance.
In general, if you want to debug the project right-click on it in the Package Explorer navigate to Debug As and select Java Application. If you are given multiple classes which can server as the entry-point, you will have to make an educated decision as to which class it is.
So Do onething like:
Right-click the Main class in the Package Explorer at left, then choose Run As, Java Application.
If it doesn't help you then there is a different way as well:
1: Just remove the project from the workspace and,
2: under the local filesystem list in the project explorer, right-click the folder of the project and
3: click Promote to project.
This will might help you..
Check if you are able to view the option Android SDK Manager in Window menu.
If not, download the required tools through Help menu > Install software. Download the softwares required for Android app development, then you will be able to run your project only.
Tell me if it still does not work for you.
Turned out I was trying to run program using :
public static void man ()
instead of main()
check for mistakes in code , probably it will work .
I renamed a project in Eclipse via 'Refactor > Rename' as suggested in this answer.
I now want to rename it again, but the Refactor menu has only one menu item now (Android > Extract Android String...) which is also greyed out!
I am using Eclipse 3.6.1 with the latest Android SDK 9.
Why is that and how to I restore this to normal?
Update (1): After following Sankar Ganesh's suggestion (selecting a string), the Refactor menu appeared again. I then selected the Rename... menu item again and I received the following error message box:
This is much better than the previous situation, in which I had no idea why the Refactor menu had been disabled and what to do. Still, I don't understand why this is and what rules I should follow when using the Refactor function. I only wanted to rename a project... that's all. :)
Update (2): I just tried the same exact operation again again (Refactor > Rename while the project is selected in Project Explorer) and it worked! (without issuing the message box shown above).
What's going on?
Must be a bug, because this is clearly inconsistent.
I was wonder,why you struggling for Renaming a project,
if you want to rename your project, then simply you can select your project, then click refactor menu, then Rename, that's it
step1:
Step2: Now see My project name is updated,initally it was friend finder, now friendfinderupdated
Also , you can use Extract Android String for Valid Java Identifiers and not for packages and files, because see window here
Pls select a String in your java code and do that Refactor -> Android -> Extract Android String, now you can see dialog, what i had shown below
and see next image
Mystery solved!
The problem turned out to be that I was trying to 'Refactor > Rename' while in the Resource perspective.
Once I switched to the Java perspective, this (inconsistent) behavior didn't repeat itself and I was even able to check the Update references checkbox.
Wow!
(thanks #Sankar Ganesh for posting the snapshots, because that allowed me to notice that there is an "Update references" checkbox and that the text on your caption bar is different than mine)