Android icon not being created when I run application - android-studio

I wasn't exactly sure what to look up for this. I feel like I accidentally deleted something but when I run an app in android studio it doesn't create the shortcut icon on my device. So I cant open the app unless Android studio is open and I re-run the app. How can I make it install the app again?

This might be an issue with your launcher or some other 'hidden app' feature you might have activated by accident.
Go to Settings > Apps to check if your app is installed there. If it's a launcher configuration most likely a simple reinstall isn't going to suffice, since the launcher will remember to hide the app by it's package name.

Related

ionic capacitor isn't generating run config for the android emulator

I'm follwing the guide in this section: https://ionicframework.com/docs/developing/android#running-with-capacitor
However, when I get to:
In Android Studio, click the Run button and then select the target simulator or device.
Which I'm getting to by issuing npx cap open android, I can't click 'run' because there's no run configuration. If I try to Add Configuration I can't select my app directory (or any directory) as the module - it just says <no module> in the dropdown.
Is there a step I'm missing or something that causes this? Thanks!
For anyone this may benefit, in my case I had installed the Android SDK platform but not the requisite SDK tools. There is a second tab in the Android Studio > Settings > Appearance & Behavior > System Settings > Android SDK menu called SDK Tools. You need to make sure you also install the correct tools from there.
To get the run configuration I believe you at least need the Android SDK Build-Tools.
Managed to fix it, you should ignore the sections on creating a new virtual device if you have one already. In essence the issue was that my AVD was v28 and my SDK was v30 so it wasn't compatible hence no config.

Installation freezes at "Unzipping Dart SDK" in android studio

Recently I had installed a flutter plugin in android studio. And when I chose to create a new project, it asked me for the flutter sdk. I chose "Install SDK". It froze at ""Unzipping Dart SDK".
I left it in this state for more than 3hrs, but there has been no response.
Please can any one help me to continue....
This may be a bug in flutter (that it doesn't report a useful error), there are quite a few reports like this one in the issue tracker.
You should try running flutter doctor from a command prompt, as this will perform the same job of downloading/extracting the Dart SDK but may be easier to troubleshoot.
From the issue linked above, it seems like a common issue is permissions - having it in a location like Program Files that non-Admins can't write to and therefore you need to run as Admin for it to work. A better fix would be to not put Flutter inside a protected path like C:\Program Files.
In my case (Windows 7) i found that the flutter sdk folder permission was set to be readonly, once i changed the folder permission... it works fine

android studio 3.1.1 not reflecting changes in apk

I have read at least 5 responses to this but none has worked so far... In windows 10, Android studio 3.1.1 (the latestest version, april 2018) I have an app which I have made some changes in but that changes do not deploy in the AVD. The bugs listed that it's supposed to have been corrected for this version persist, and none of the solutions for this problem I have found worked. Could anyone Help me solve this somehow? I have spent days in this... Thanks.
By the way, the app I have to modify is in react-native.
Firstly, please try cleaning your project and building the app. To achieve this, please click in menu bar Build and choose Clean project. Then go to Build tab again and click Rebuild project.
Also, please try to restart your AVD.
Optionally, go into settings of your AVD and uninstall your app manually. Then click play button and choose your AVD to run your app on this AVD.
If the problem persist please provide more info. Especially please give us more info if you are using gradle build tools, if yes then what info does the gradle console give you, etc.
Ok, if you are sure none of above work, please tell me if your changes are reflected on another, possibly new AVD?
Do you have a chance to try your app on real device connected to your computer in debug mode (Developer Tools active, computer trusted and usb debugging allowed)? Do you see changes in your app on device?
Let's give another try to something like this: please open build.gradle file, then make some slight change in it (like add some space). Android Studio should notice change in gradle file so it will prompt you with yellow bar above with option: Sync Now. Does your app reflect changes after that?
And lastly, are you sure your changes are not reflected? Can you add something logging to Logcat (i.e. Log.d("test", "this should print in logcat debug level.."); ).
Another edit, have you tried this?
Open MainApplication.java in the android/app/src/main/java/{packagename} directory, delete the following code if exist:
import com.facebook.react.BuildConfig;

Android Studio won't run application from studio ide?

I've got an application I've been working on and am having an issue with android studio. When I click "build->run" and then select my device, the application never runs on my phone (and the log in android-studio that automatically comes up does not have anything, whereas in the past when I have used this feature it usually says something like, "waiting for phone..." and then the application pops up and automatically opens on the phone and you get some other pertinent information). I have the phone already in developer mode with the install from unknown sources set to on. When I manually move the application from its gradle build location to the phone and then install it manually in file explorer, all is well and the application performs as expected. As I need to debug, however, this is not a very viable solution. Anybody have any advice as to how to get it to run from the IDE? I have tried rebuilding and invalidating the cache/restarting android studio, to no avail.
When I click the run tab at the bottom I have an empty window. When I click the debug tab, I see:
Waiting for device.
Target device: samsung-samsung_sm_g920a-randomIntegerId
Uploading file
local path: /home/eric/Documents/class/OOSE/final_project/2015-group-17/project_code/android/Place2B/app/build/outputs/apk/app-debug.apk
remote path: /data/local/tmp/oose2017.myApp
Note: I am building the application on a LUbuntu 15.04 VM on a windows 8 host, and am using the latest version of android studio.
EDIT: gradle console indicates a successful build as well (obviously since moving the .apk manually to the device works properly).
Open 'Run->Edit Configurations...', and look for your app module in the column on the left-hand side.
Select it, then go to the 'General' tab.
Under the 'Activity' section, there are a couple of radio buttons. Make sure that 'Launch default activity' is selected.

Wrong build being deployed on Android device using Visual Studio 2012 Xamarin.Android

I am using Visual Studio 2012 and Xamarin.Android Beta release to develop an Android application. When I try to deploy the android application for debugging purposes onto an Android device, it deploys the previously built application on the device and not the recent changes I made and deployed (i.e No refresh of build). However, if I use Xamarin Studio to do the same, it deploys the correct build everytime (i.e refreshes the build with new code changes).
Any idea why this is happening?
Thanks in advance!
I had a similar issue: With Visual Studio 2019 the debug version of my driver was deployed while building the release version.
The cause of my problem was, that in the Properties -> Driver Install -> Package Files I had an absolute path pointing to the debug version of my driver in the column File. This setting is valid for all configurations (not separated for debug/release), and when entering macros, they are immediately expanded to absolute paths.
I fixed this by editing the .vcxproj file with my favourite editor and changed the path back to $(TargetPath).
I had the same problem. My solution was to add "deploy" to the build configuration:
BUILD => Configuration Manager... => (select "Debug" from left-hand combo-box) => (tick "Deploy" in grid)
Courtesy of this xamarin forum post.
I have no idea why it does this, I had this issue before. I also noticed that the device log was somewhat behind (ie, at 3.30pm, the last record on the device log was 11.00am).
Uninstalling the app from the device and re-deploying it seems to correct it.
Note: I had this issue in VS, didn't check with XS.
I would look at the difference in your deployment settings in VS and XS (I think it may have something to do with the Fast Deployment option).
Similar question (though for iOS Simulator) here.
I had a similar problem (though on an Android emulator).
What didn't work for me:
restarting the computer
restarting Visual Studio
deleting bin / obj folders
going into Configuration Manager (Debug / Release / Configuration Manager) and ticking everything there - everything was ticked
changing the version of the app in the manifest
What worked for me?
Uninstalling the app from the emulator and then running Debug again.
It was an Android emulator, so I uninstalled by clicking on the app icon and holidng for long, and then dragging it to "Uninstall App". On an iOS simulator it should be similar.

Resources