Change name APK Android Studio - android-studio

I created an app in the android studio called eCoding. However, when I compile and pass the APK file to my phone, the name that appears is FolioReader. I have already changed the string package, the project name and it remains the same name... Someond to help me?

Please change the android:label field in your application AndroidManifest.xml.

You need to change app_name from Strings file in resources directory.

Related

layout resource directory not created automatically when I create android project in android studio

At first when i create my my android project in android studio android studio automatically creates a layout resource directory which contains the activity_main.xml file along with the main.kt file in the java directory.But after creating some few projects, android studio fails to provide me with the layout directory with the activity_main.xml and main.kt files automatically.I'm a beginner with the android studio environment that's why i prefer it comes with the layout resource folder and activity_main folder because I mess up the configurations when i create them by myself and fails to lunch app on my android phone.I would like to know whether there is a way to reverse this problem or i should always create my layout resource directory by my self if so then i would like a demonstration of how to create my main_activity.xml so that i don't mess the configuration.Any help would be appreciated and thanks in advance.
It seems you are looking to create from a template (create activity along with the layout and added the activity in the manifest as well). Please read the docs in here: https://developer.android.com/studio/projects/templates

Your SDK location contains non-ASCII characters - no Android in Tools Menu

I've just downloaded and installed Android Studio but there is no Android submenu in Tools menu and no AVD Manager icon on the instrument panel. When I start SDK Manager, there is an error message:
Please specify a Android SDK location
SDK Manager screenshot: "Please specify a Android SDK location"
If I click on Edit link next to Android SDK Location field, there is another error message:
Your SDK location contains non-ASCII characters
SDK Components Setup screenshot: "Your SDK location contains non-ASCII characters"
I studied these somewhat similar questions, but non of them helped me:
Your project path contains non-ASCII characters android studio
Unable to install SDK tools component while installing Android Studio
unable to install or locate android sdk in android studio
NO Android option in "tool" menu, and no avd manager
I see that the path really contains non-ASCII characters, but is there any workaround other than uninstall Android Studio and then install it from scratch to some other directory like С:\Android\SDK?
UPD:
it seems there is no such workaround at this time
As a matter of fact at the moment there is no other way than to re-install Android Studio to some other directory with no non-ASCII characters and blank spaces, like С:\Android\SDK
I guess you've solved this by now but I ran into the same problem today and after a little research and some annoying tries I solved it. What I found out is this:
Using mklink function you can create a junction to a location but it will not boter if you are creating a it to a non existing location(that's the "file not found" you were getting). And you are creating a junction to a non existing location in this case due to C:\Users\username\AppData\Local\Android\Sdk should(not sure about this) be created by the Android Studio Setup Wizard during installation. In order to solve that, you should create \Android\Sdk in C:\Users\username\AppData\Local and it's done.
The installer does not show junctions to non existing locations in the Sdk install location so if you don't create the folders you can't select the link.
Finally but not less important, the installer does not allow the Sdk to be installed in a folder in the root directory C:\, so you have to create the junction in any other directory but the root one or move it if it's already there(that's what I did).
As I was writting this the installer was running and when it was done I came across the exact same problem with the location to store Android Proyects, and so the same solution to the installer must be aplied to the Save location in the New proyect step.
This is exactly what I did:
1) Create \Android\Sdk in C:\Users\username\AppData\Local\
2) Open cmd as admin and enter the following command:
mklink /J "C:\..\android-sdk" "C:\Users\username\AppData\Local\Android\Sdk"
It will return this:
C:\WINDOWS\system32>Junction created for C:\..\android-sdk <<===>> C:\Users\username\AppData\Local\Android\Sdk
Note: android-sdk is the name the junction will have, you can name it as you like and \..\ reffers to the folder where you want to put the it in, make sure there are no non-ASCII characters in the folder's name anyways.
3) In the Sdk install location, select C:\..\android-sdk and the installation will be ready to go.
4) Repeat the process for the Save location for new proyects, just instead of C:\Users\username\AppData\Local\Android\Sdk use the location you want the proyects to be stored in.
Didn't try moving the junctions files but I suggest you don't, I guess that could get the paths lost and mess up the installation.
Hope this is usefull and good luck with your proyects!
If you don’t want to reinstall the Android SDK in another location you can also create a junction point which is a link to the actual location. You can use the junction tool to do this.
For example, you can create the directory C:\Android and then create the junction SDK and claim the SDK lives there with
Junction C:\Android\SDK C:\Users\Whatever\actual\location
The operating system will show the same contents under both paths and applications will not know the difference.
Hey I had the same problem here but I was able to fix it by just changing the directory to a new folder directly on the hard drive.
Hope this can help.
In my case since I have a Windows 10 operating system, and my sdk was located in Program Files. Having spaces in the directory caused some sort of error, to solve this I used mklink to create a junction called android-sdk in the C drive that pointed at the directory where my sdk was located.
If you can't find the sdk in
C:\Users\username\AppData\Local\Android\Sdk
I suggest looking at
C:\Program Files (x86)\Android\android-sdk
then trying
mklink /J "C:\android-sdk" "C:\Program Files (x86)\Android\android-sdk"
Afterwards open Android Studio go to Project Defaults > Project Structure > Android SDK, click on the "..." button to browse for your sdk and select the junction you just created. Or if you still haven't setup android studio because of this issue, open the application as administrator select the theme settings and all that, and when you reach the setup sdk section, click on the "..." button to browse for your sdk and select the junction you just created.
Important to run Android Studio setup as administrator otherwise you may experience issues downloading components, if you still have issues it might be your antivirus blocking the setup.

Android Studio is showing wrong project name

I have an Android Studio Project , the original name was GUI-refresh-by-time however it is showing Typer in the main screen.
But when I open the project, it becomes GUI-refresh-by-time
My .idea/.name is called "GUI-refresh-by-time"
How can I resolve this issue? It might lead confusion specially when you have too many projects.
Ok, I solve it anyway.
The problem occurs because I have another Android Studio project name
Typer , both of them are located in the same Folder Location root/Gui-GUI-refresh-by-time and root/Typer
Basically this root/Typer does not have .idea/.name so I decided to delete the Typer project Folder and reopen my Android Studio, after then it works.
you could just remove the project from the workplace by saving it elsewhere and try reimporting it

Error after updating Android Studio

I have updated my Android Studio to 1.2.1.1 and now i am trying to create a new project and it shows an error:
"Error Loading Default Project "
Fatal error initializing 'com.intellij.openapi.vcs.changes.shelf.ShelveChangesManager'
Please suggest a solution. Thanks in advance
Experienced the same problem on Ubuntu/Linux.
In my case the solution was to change the save path of my project from relative, to absolute.
Trying to create a new project in ~/AndroidStudioProjects/MyApp would generate this error
But if I specified the full path /home/myusername/AndroidStudioProjects/MyApp, the problem was resolved.
You have to reset Android Studio and this is a configuration problem.
Uninstall android studio and install again.
This link will help you with all steps of reinstall.
Unable to create new android studio project?
I just came across the same error:
'com.intellij.openapi.vcs.changes.shelf.ShelveChangesManager'
Make sure that you have permissions to write to the project path.
android studio stores the project in the last location you loaded from and in my case it was a Flash Drive...
#Garima Mathur's answer suggests that is a 'configuration problem'
If it's a 'configuration problem' you can delete(*or better rename) the configuration folder.
which is located in the c:\users\CURRENT_USER\.AndroidStudio1.2
but in my case the solution was to change the path of the project to be saved.
I had the same error of "Error Loading Default Project"
Fatal error initializing
'com.intellij.openapi.vcs.changes.shelf.ShelveChangesManager'
and I figured out where the error was coming from. Previous I was running my project from a USB key labeled volume F. Later when I opened Android studio after unplugging, the default storage path was still F. Make sure your path is okay.
I also had the same problem. Following process worked fine for me:
Open your any old project in android studio.
Go to File > New > New Project.
Set Name to your Application.
At bottom of window there is "Project Location TextField".
Just change the Location Path to the desired folder and click Next Button.
I had the same issues, I tried to figure it by my self and it worked.
Try this, open your old project, then in your old project window, go to file > new > new project, and it will show the new project window to let you setup your project, after you finish your project setup, click finish and your project will start building and it will bring you to your new project window.
That's all, it works for me.

Project Name in Android Studio Does Not Change

I followed the instructions here Change project name on Android Studio and while my project name in the project explorer changed, the project name in the top IDE bar does not(the very top left of the IDE window). I renamed the project by right clicking the project name, updated the manifest's app_name and package name.
This is a bug where some pointers in the duplicate project still point to the original project. I experience this only when using "Open Project" to bring the duplicate up in AS. This is solved by using the "Import Project" instead and then refactoring and renaming accordingly.
This brings up another issue, however. While the naming is correct, something is still pointing to the original, because launching either the original or the duplicate on the device replaces the other on the home screen.
With Android Studio off, I renamed the project folder in Explorer and restarted Android Studio and imported project. Now this created another .iml in the project folder so I went ahead and deleted the old .iml .
(it seems to have correctly changed the app.iml in src also)
I hope this is all there is to it.
this work for me:
Close android studio
Change project root directory name
Open android studio
Open the project(not from local history but by browsing to it)

Resources