"Could not get user for package id" error on completely fresh blank project on fresh install - android-studio

I get this error on every project, even completely blank ones with just an empty activity, I've tried adding the package name to the manifest, and checking the package name in the gradle files. I've also gone as far as deleting every reference of android studio on my pc and doing a complete fresh install and that did not work either. If anyone has any ideas of how to fix this, please let me know, usually programs work fine, but I need to request permissions and the permissions manager also cannot find the package. Picture of the error upon install on the android emulator

Related

Location menu in extended controls of Android Studio virtual device

I need to import a .gpx file to my virtual device (something I'm attempting for the first time today), but I'm having a problem I can't find any reference to anywhere else. I'm either having a moment and missing something that should be obvious or there's an issue with the specific build I have that's causing an issue. I have Android Studio 3.5.3 installed and I've tried multiple different virtual devices.
All references to the menu page referenced in my title that I can find online look like this:
While my version of that page looks like this:
That "Import GPX/KML" button always appears to be greyed out. What am I missing here?
Eventually found the cause of this and a solution. The issue was caused by an Android emulator release that updated the Location settings to include a Google Maps based UI. Release notes here, though I've found the 29.2.11 release on 03/12 also contained the UI change: https://androidstudio.googleblog.com/2019/12/emulator-29212-stable-google-maps-ui.html. On my Windows 10 computers this also removed the option of importing a GPX file (not sure if this was an intentional choice by Google or a bug). Not sure if it will affect Linux or Mac users but I've observed the issue on multiple Windows 10 devices.
The fix I found for the issue was to downgrade my emulator to 29.2.1. That version can be found here:
http://dl.google.com/android/repository/emulator-darwin-5889189.zip
http://dl.google.com/android/repository/emulator-windows-5889189.zip
http://dl.google.com/android/repository/emulator-linux-5889189.zip
In Windows, next go to C:\Users[username]\AppData\Local\Android\Sdk\emulator. Those of a cautious disposition can backup this folder, but either way the package.xml file will be needed and everything else can be moved or deleted. Edit the details in the XML to match the version number of the downloaded emulator. Copy the downloaded files to this location along with the package.xml. Then just make sure not to download the update again when Android Studio is opened.

Android Studio - No SDK Found - Setup wizard fails - Firewall Proxy

So getting right to the point, I am behind a corporate firewall. I had to manually download the zip file for Android Studio which I extracted to program files (windows 10) on my machine. When I launch studio I'm dialogue'd studio needs to retrieve sdk's which I try to do but it fails on these 3 zips.
build-tools_r29.0.1-windows.zip
platform-29_r01.zip
sdk-tools-windows-4333796.zip
Mostly I see
java.net.SocketTimeoutException: Read timed out Warning: An error
occurred while preparing SDK package Android SDK Build-Tools 29.0.1:
Read timed out.
I'm assuming my firewall proxy is preventing this type of setup install since the links to these zips point outside our network but I am able to download the zips individually through a browser session one by one and save them here
c:\Users\myPin\AppData\Android\Sdk
I extracted each zip file and then reran Android Studio but it doesn't seem to have made any difference. It still goes out trying to download the same packages which I already extracted to the SDK folder. Shouldnt studio see the zips I've extracted in the SDK folder location? How can I get this working?
So we have work around I think others might find useful. If your having problems with the Gui SDK manager, then definitely use the cmd based sdk manager. This did not time out for us.
So for example where in the Gui I would get something like
java.net.SocketTimeoutException: Read timed out
When tryin got get platform-29_r01.zip
But if I try to perform the same operation using C:\Users\PIN\AppData\Local\Android\Sdk\Tools\bin\sdkmanager.bat using whatever cmd tool you like (I like cmder).
.\sdkmanager.bat --proxy=http --proxy_host=access.lb.ssa.gov --proxy_port=80 "platforms;android-28" --verbose
The above cmd will dl's and configure the sdk correctly.
You may have to do this for any of the sdk's you require. I think in our Firewall proxy scenario there's a user-agent setting or something that is not set for the Gui which is causing the timeouts but not with the cmd tools so this is a legitimate work around I think.
First things first. You have to check your Computer time, it must be accurate. If still error appeared, try this.
On you PC search Powershell and type code below. See image below for reference.
Path reference
Powershell Image
Failed version code
Click Retry
.\sdkmanager.bat --proxy=http --proxy_host=access.lb.ssa.gov --proxy_port=80 "platforms;android-29" --verbose
Run powershell > type cd> path of files
Check what SDK number version is getting error
From the android studio ERROR, click Retry while powershell is running.
If the said SDK version number is fixed, go to the next version number, by pressing control+C to powershell to stop the command.
Then type the same code with different number..
Note: If you do not have bin folder. You can create a folder named bin and create sdkmanager.bat file, inside sdkmanager.bat file, type this code >> sdkmanager.bat and save.

InstallShield partially removes program after cancelling its removal

I've got an Installscript MSI project that's behaving a bit oddly.
Following a successful installation, if I launch the installation file again, I get a pop-up with a question:
"Do you want to completely remove the selected application and all of its features?"
This, of course, is the expected behaviour.
If I select "No", the "InstallShield Wizard Completed" dialog is displayed, and it notifies me that "The wizard was interrupted before [the application] could be completely installed."
Again, this is all within expected behaviour.
The unexpected bit is that after closing this dialog, the application is partially removed from my machine. The installed files and registry keys are still present, but it no longer appears in Windows' "Apps & features", and if I run the installation file again it starts a new installation, as if the application had never been installed.
I tired enabling maintenance mode, but to no avail. Cancelling the maintenance dialog triggers the same partial removal.
Any clue what's going on here, or ideas to fix this?
I have also faced this issue when long back I was working on InstallShield scripting.
The unexpected bit is that after closing this dialog, the application
is partially removed from my machine. The installed files and registry
keys are still present, but it no longer appears in Windows' "Apps &
features",
Have you implemented the uninstall script functions in your installscript for uninstalling or updating the installation? You may look into these functions and verify the logic for those particular features or components.
and if I run the installation file again it starts a new installation,
as if the application had never been installed.
In the installer folder, where you have your installshield setup.exe, you have TEMP folder in that folder you have "Installation.ini" file, there it tracks the instances it has installed with that particular name.
So it might be because installshield is removing the entry from installation.ini file and when you are trying to install the same package again you are able to do this.

Error when using development time IIS support

Update: this bug has been fixed for a while now
I installed Visual Studio 2017.3 yesterday and was trying to used the new Development time IIS Support feature. I think I encountered a bug, and I was wondering if anyone knows a workaround this bug. When I used it with a new project it works fine most of the time. By most of the time, is that I think it is broken sometimes depending on the where the project is located/state of cached data, etc.
Sometimes I get an error "Value cannot be null. Parameter name: name". That's the entire error. No log files, no extra information.
I tried to enable the feature for an existing project I am working
on, it got that error.
I tried adding a new web project in a new solution it worked fine. I tried adding a new web project in the same solution as my project, it didn't work.
I deleted all temp files, all bin obj and .vs folders and .user files in the
solution. Same problem.
I deleted temp folder, visual studio user profile data, and restarted the PC same problem.
I tried again in the same solution with the project not having '.' in the name, it worked.
I did some modification to the project that was working and tried to launch again I got same error.
I reverted all changes so that the project was back to the "empty project" state, still same error.
I removed the project. Exited visual studio, deleted all temp/.vs/.use/bin/obj files. Then restarted and added the project again, it worked.
I restarted VS and tried to relaunch it didn't work.
The aspnet core version seems to be not related to the bug. I had the problem with projects targeting 1.1 and 2.0 and also had the feature working for both versions.
So obviously this is a bug in VS2017.3. Since even if I am doing something wrong I should at least get an error explaining what I do wrong not an ArgumentNullException message. I already made a bug report. I am wondering if someone knows a workaround thing bug.
Thanks a lot in advance.
Update: This bug has been fixed for a while now.
After some investigation and with help from a helpful member of Microsoft's Visual Studio Team, I found that Visual Studio was failing at the point where it grants folder read access to the IIS App Pool account. The method that gets the App Pool account name was returning null, and when that null value was passed to the System.Security.Principal.NTAccount class constructor, the ArgumentNullException is thrown.
A workaround that fixed the problem for me, was changing the App Pool to any other App Pool, trying to launch, then changing it back to the original/desired App Pool.
First You Must Update Visual studio with visual studio Installer and Launch the Visual Studio installer.
And Select the Development time IIS support component and Modify.
Wait For Download is Processing
The component is listed as optional in the Summary panel for the ASP.NET and web development workload.
Then you Create New Project Again
Problem Solved.

Error while Installing APK app-debug.apk does not exist on disk

Hopefully someone can help. Have an APP that I have been working on for awhile. Compiled it earlier, no issues, and ran a debug on an attached device.
When I came back to AndroidStudio today, was prompted for an UPDATE to studio as well as a Gradle update. Ran both updates as listed... no errors during the update.
Restarted AndroidStudio and "Run APP" once again. Went through the Gradle Build as normal... then received an error when installing to the attached device....
Session 'app': Error Installing APK
Checking the RUN, I am getting:
The APK file C:\Users\Pete&apos;s PC\AndroidStudioProjects\<myapp>\app\build\outputs\apk\app-debug.apk does not exist on disk.
Error while Installing APK
That file exists with the current build date/time.
Doing some searching, people mention CLEAN / REBUILDS in various steps, tried them all. Tried exiting AndroidStudio too. Went to the device's Developer Options and Revoked USB Debugging Authorizations... then reapproved them when prompted. Also tried SYNC.
Nothing works.
It's even more frustrating because I didn't change one line of code, one setting, or anything. It was a prompted AndroidStudio/Gradle update. Uggghhh!!!
Any other suggestions... I am dead in my tracks right now.
I do get the same problem as yours but I solved it by transferring the project file to a thumb drive. Any drive but not C drive.
It can install the apk in my phone. Hope it works.
It looks like it might be an actual bug in AndroidStudio. My "path" to where the project is stored is based off the "computer name" that was created when my copy of Windows 10 was originally setup... "Pete's PC".
So the path is....
C:\USERS\PETE'S PC\AndroidStudioProjects\myproj
It looks like the apostrophe (') in the path is throwing it off. If I move the project to ANY where where there isn't an apostrophe in the path, it compiles/installs fine... as is.
Thanks to Syaf for sort of pointing me into this direction with his "move the project to a flash drive"... that's what got me thinking and trying things.
Sadly, this is possibly a problem for alot of people because even during the Windows 10 setup, you are prompted to name the computer you can remember.... like John's PC.
I forwarded my findings to Google for review.
Peter

Resources