Cant pull/push git from Android studio 4.0 canary - android

Each time I attempt to pull a repo from bit bucket, I keep getting the error
Failed to start Git process User Authentication Token not found
I have tried resetting the windows credential, uninstalling and reinstalling both git and Android Studio, as I think there is a compatibility issue with Android studio 4.0 and my pc which uses windows 10.
Any ideas?

The following helped me:
From the directory of the previous version C:\Users\(Your user)\.AndroidStudio3.(version)\config(I checked on 3.5 and 3.6 versions) copy the user.token file.
Paste it into C:\Users\(Your user)\.AndroidStudioPreview4.0\config
Launch any git operation requiring authorization (push/pull), in the window that appears, enter your authorization data.

Here's the workaround from Google's issue.
Close the IDE.
Remove settings for Android Studio 4.0 or copy them somewhere else.
Install 3.6 RC 1.
Run it and perform any Git operation in the IDE.
Close 3.6 and open 4.0 again importing settings from the previous version.

You are not alone with it.
Have the same issue on Linux (Android Studio 4.0 Canary 5).
I could not "Enable Version Control Integration" in the new project.
I tried to login on GitHub in settings (Version Control -> GitHub), I put my token and then seen the success... but when I closed the settings window and reopen it I seen the message "Missing access token".
EDIT: 2019-12-21
I want to make you happy.
I found the page with previous versions of Android Studio.
Git works in Android Studio 4.0 Canary 4, just remove your version and download it on the link below.
https://developer.android.com/studio/archive

If you've created two-factor authentication, you can't log in like this, so try something like this:
git remote -v
git remote remove origin
git remote add origin git#github.com:user/repo.git
visit here to get token: https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line

Related

Issue with using Git Push in Android Studio Chipmunk 2021.2.1 on Mac M1 "Invocation failed Unexpected end of file from server" [duplicate]

I am trying to push my code to my bit bucket repository but from last few days after update from bit bucket, I have to use token to push code. But I don't know where to add token.
Could anyone let me know the entire process for android studio. I have also gone through with This documentation
.But didn't get any idea about how to use it in android studio.
As for me I use android studio, I came across the same issue; where I was unable to make push command to my github repo, that is after an update of my IDE version to chipmunk.
Solution that worked for me:
Enable the Credential helper - In the IDE select File -> Settings -> Version Control -> Git -> Mark the check box for use Credential helper. Then apply changes.
Invalidate and clear caches - In the IDE select File -> Invalidate caches.
after several hours of research I found the best soultion for this I dont know this is the right way to use it or not. But its working fine.refer this answer...Refer this
git config --global --unset credential.helper
and then git pull from terminal
git pull
then will ask your username and password
You may try with below flow, If you are using android studio in Windows :
File -> Settings -> Version Control -> Git / Check "User credential Helper"
It's working for me.
Simply update your git version :
git update-git-for-windows
I also encounter this problem, I am using mac and I solved it by
cmd + space
type keychain access
search github
delete the keychains found
delete github on my android studio (android studio -> preferences -> version control -> Github)
re add github on my android studio using new personal access token
Hope this help, Thanks
I just had the same error. I downloaded the project again and tried again, it gave an error. Then I updated the token in my GitHub account then I turned Android Studio on and off and it worked for me.
Interesting case of PyCharm update:
OS: Ubuntu 18.04
In my case the PyCharm got updated and the existing open project was using older version.
Solution : Just closed the existing older PyCharm and open the project in newer version
For Bitbucket
create your "app password" on bitbucket console. Under your Avatar ->Personal Settings ->Access Management ->App Password.
Once done, copy app password and push from the terminal enter -
git remote set-url origin https://<Your_Account_Name>:<App_Password>#bitbucket.org/<Your_Account_Name>/<Repo_Name>.git
For Github
create a new GitHub token,
Once done copy token and push your project from the terminal :
git push
you'd be asked to input your username
Username for 'https://github.com': use actual GitHub username not email
Then you'd be asked to enter your password
Password for 'https://"username"#github.com': this is where you paste the token you just created
commit will be pushed after this

error: unable to read askpass response from '/home/.cache/Google/AndroidStudio2021.1/tmp/intellij-git-askpass-local.sh' in ubuntu android studiio

I am trying to push my code to my bit bucket repository but from last few days after update from bit bucket, I have to use token to push code. But I don't know where to add token.
Could anyone let me know the entire process for android studio. I have also gone through with This documentation
.But didn't get any idea about how to use it in android studio.
As for me I use android studio, I came across the same issue; where I was unable to make push command to my github repo, that is after an update of my IDE version to chipmunk.
Solution that worked for me:
Enable the Credential helper - In the IDE select File -> Settings -> Version Control -> Git -> Mark the check box for use Credential helper. Then apply changes.
Invalidate and clear caches - In the IDE select File -> Invalidate caches.
after several hours of research I found the best soultion for this I dont know this is the right way to use it or not. But its working fine.refer this answer...Refer this
git config --global --unset credential.helper
and then git pull from terminal
git pull
then will ask your username and password
You may try with below flow, If you are using android studio in Windows :
File -> Settings -> Version Control -> Git / Check "User credential Helper"
It's working for me.
Simply update your git version :
git update-git-for-windows
I also encounter this problem, I am using mac and I solved it by
cmd + space
type keychain access
search github
delete the keychains found
delete github on my android studio (android studio -> preferences -> version control -> Github)
re add github on my android studio using new personal access token
Hope this help, Thanks
I just had the same error. I downloaded the project again and tried again, it gave an error. Then I updated the token in my GitHub account then I turned Android Studio on and off and it worked for me.
Interesting case of PyCharm update:
OS: Ubuntu 18.04
In my case the PyCharm got updated and the existing open project was using older version.
Solution : Just closed the existing older PyCharm and open the project in newer version
For Bitbucket
create your "app password" on bitbucket console. Under your Avatar ->Personal Settings ->Access Management ->App Password.
Once done, copy app password and push from the terminal enter -
git remote set-url origin https://<Your_Account_Name>:<App_Password>#bitbucket.org/<Your_Account_Name>/<Repo_Name>.git
For Github
create a new GitHub token,
Once done copy token and push your project from the terminal :
git push
you'd be asked to input your username
Username for 'https://github.com': use actual GitHub username not email
Then you'd be asked to enter your password
Password for 'https://"username"#github.com': this is where you paste the token you just created
commit will be pushed after this

Git working in bash but not in Android Studio

I've recently encountered an issue with Git in Android Studio.
I have some projects in Android Studio, taken from a git repository (managed with Gitlab). Until some days, actions like Push & clone worked perfectly, but not anymore...
I can still push & pull from the Git bash, but not in Android Studio.
It give me the following log :
Git Pull Failed
fatal : Could not read from remote repository
The test button under Settings->Version Control->Git work, I've reintall the last version (2.6.4) and it show me the correct version..
I've try generate a new SSH key, import a project cloned with the bash... But nothing work..
Any clue of the problem ?
Thanks in advance
Ok, I've found the solution :
It was because since some days ago, I use Android Studio in Administrator mode, but my SSH key was in my user profile.
As I was using Git in Bash mode with my profile, it was ok. But Android Studio was looking for the .ssh in the Administrator profile, wich doesn't exist..
I use Android Studio with my profile again, and it work again

Visual Studio 2015 Xamarin deploy fail without any error message

I just installed VS 2015, the installation was finish (after some fail time caused by the slow network, I run setup again).
I create a project as Android > Android blank project
When I press F5, the build is seem to by success but the deploy is fail, there isn't error message. Tried set Tool->Option->Build->Diagnostic, no result. VS 2015 is pretty new, is anyone met this? How can I fix this?
I bumped into the same, but I started VS2015 as Administrator and solved the problem.
Is any Android Virtual Device running?
Open AVD menu
Launch the device
Wait for it to fully load
Build and deploy
Find your app in device's menu and execute it
Visual Studio gets stuck trying to deploy the app to the emulator or the emulator does not appear as a debug target in other IDEs
If the emulator is running, but it does not appear to be connected to ADB (Android Debug Bridge) or it does not appear in Android tools that make use of ADB (for example, Android Studio or Eclipse), you may need to adjust where the emulator looks for ADB.
The emulator uses a registry key to identify the base location of your Android SDK, and looks for the \platform-tools\adb.exe file under that directory. To modify the Android SDK path used by the emulator:
Open Registry Editor by selecting Run from the Start buttons context menu, typing regedit in the dialog box, and choosing OK.
Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools in the folder tree on the left.
Modify the Path registry variable to match the path to your Android SDK.
Restart the emulator and you should now be able to see the emulator connected to ADB and associated Android tools.
And yet another recipe of fixing this:
clean projects
remove all bin, obj folders
mark your android-project
as startup
then try to deploy again
As for me, in some cases, if visual studio stucked on project building, it requires pc reboot.
I had the same annoying issue. Going to Options -> Xamarin -> Android Setting and checking Preserve application data/cache on device between deploys solved my problem.
I was facing same issue.
Just reopen visual studio and rebuild your project..and then try to deploy.
Its worked for me!
According to Magnus Grindal Bakken's comment, I found the solution.
1) The installation must have an internet connection to be completed.
Any interruption may cause components to be excluded.
2) You need android emulator. Installing the Android SDK and Visual Studio 2015, is not sufficient, You either need the Microsoft emulator, the android one or another third party emulator (like Genymotion). You also need to ensure that the Xamarin plugins for Visual Studio are installed.
Xamarin for Visual Studio can be downloaded here. Once it is installed Visual Studio will be able to create and run Xamarin projects. Xamarin for VS includes the Xamarin Player for emulation. I think it's even better than Genymotion.
Start emulator via AVD manger ... [start] button (as user m93a suggested).
And next option contains check option "wipe user data". Check it !
It helps me solve this problem. Then deploy or debug the application and all process will works as expected.
I had the same problem with my XF App, it didn't deploy and just one message saying Deployment Failed, internal error....
I solved it. Working on Mac with Xamarin Studio, make sure that the ABI of your simulator is supported by your app.
Xamarin Studio Android project Options
Just run your Visual studio as Administrator mode.
Sometimes the physical Android device gets confused about versions.
On the device, to go settings | Applications Manager | All applications.
Manually delete your application.
Manually delete "Mono Shared Runtime" (don't worry it will reinstall during deploy)
Make any change in your project so it is seen as altered and needing to be recompiled: Add a new blank-line to a .cs file or something.
Build
Debug/deploy
I faced that problem couple hours ago, I tried to deactivate hyper-V and it worked for me.
In the Android App project Properties in Visual Studio I had to go to Android Options>Advanced and make sure the Support architectures had the architecture of my AVD checked.
In my case this was x86_64 (which, by the way, does not have a particularly discovereable method of installation - took me days).
First of all, we can find the error in "Details" when we click "Start" button on "AVD Manager" for "Android_Accelerated_x86". If the error is as follows :
Please ensure Intel HAXM is properly installed and usable. CPU
acceleration status: HAXM is not installed on this machine
So, in this case we need to install "IntelĀ® Hardware Accelerated Execution Manager". It can be downloaded from following link :
haxm-windows_v6_0_6.zip (6.0.6)
Note: After installing Xamarin for the first time in visual studio 2015 i had the same error to run "Android_Accelerated_x86". After installing this accelerated emulator is now up and running.
If the emulator does not even lauch, maybe deploy is skipped.
You cas see this in the output console.
If so, you may have to activate the deploy by checking it in the solution's (not project) parameters.
If the emulator launches but the deploy won't end after minutes, with no error, try the steps described here : https://stackoverflow.com/a/32564067/7505268
That solved it for me.
I had Xamarin Android Player opened while trying to deploy the Android project. This steps worked for me:
Closed Xamarin Android Player
Ran Android project again
in my case I had this problem because "Solution Configuration" was set to Release. I change it back to Debug and I solve the problem
Try one of the following and see if you can get the app to deploy to your device.
Clean and build project/solution
Make sure you have updated all the NuGet packages (Right click on solution and click on Manage NuGet Packages.... Then check in Updates section whether there are any updates)
Make sure you have installed all the necessary SDKs from the Android SDK Manager
Check whether you have selected the correct project as the startup
Check if you have set the correct path for Android SDK and NDK locations
Make sure you have checked Deploy for your selected project from Build -> Configuration Manager
Well there can be many reasons,one of them could be that from the Build section in your toolbar,if you check the configuration manager there will be project names that are available in your current solution all you have to check is if the deploy checkbox is checked or not.If not kindly check it and things will work just fine
This worked for me:
Making sure that Define DEBUG constant is checked.
Using Log.Info("yourTag-AnyString", "Error before/after ");
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
// Set our view from the "main" layout resource
Log.Info(tag, "Error before Layout");
SetContentView(Resource.Layout.Main);
// Get our button from the layout resource,
// and attach an event to it
//Button button = FindViewById<Button>(Resource.Id.MyButton);
//button.Click += delegate { button.Text = string.Format("{0} clicks!", count++); };
Log.Info(tag, "Error before variables");
userName = FindViewById<EditText>(Resource.Id.editTextUsername);
password = FindViewById<EditText>(Resource.Id.editTextPassword);
btnInsert = FindViewById<Button>(Resource.Id.btnInsert);
Log.Info(tag, "Error after variables");
btnInsert.Click += BtnInsert_Click;
}
changing emulators or exporting the signed .apk instead
For android apps, using android device logging
There is actually a connection between running Visual Studio as administrator and setting the registry path.
I followed the instructions here but it only worked after running VS as admin because my Android SDK path is in "C:\Program Files (x86)". So in order to add or change files there you need admin rights. Alternatively you can change the permissions of the "Android" folder so that the group "Users" as full access. This worked for me as well.
Or you make sure you don't even install the Android SDK in "C:\Program Files (x86)".
By the way I found that restarting VS, or even the Emulator again wasn't necessary after I added the registry key. It picks it up when it needs to.

"The following SDK components were not installed: sys-img-x86-addon-google_apis-google-22 and addon-google_apis-google-22"

I'm Windows 7 64-bit user and I got Android Studio problem after I update the latest version of Android Studio and SDK components..
The following SDK components were not installed: sys-img-x86-addon-google_apis-google-22 and addon-google_apis-google-22
Please help me to resolve this problem. Thank you.
I had the same issue when trying to upgrade Android Studio from 1.1 to 1.2 on Mac OS 10.10.
I solved the problem by selecting custom installation instead of standard. Also we need to select the Android SDK Platform (Lollipop 5.1).
Choose the new UI Design >> next
Just try to cancel the "Downloading Components" from upper right
corner 'X' button.
A dialog box will appear then click OK (wait a bit for first time
launch)
I uninstall Only Android studio (keep the SDK and Emulator) and then reinstall it just android studio. took me 2 minutes and my android studio work again.
I had this same problem, but I'm a Linux user.
I resolved the problem by reattempting the installation with adminstrator privileges. [For those Linux users reading this, I ran studio.sh with sudo.]
I just click 'Retry' and it's ok! Also run on Win7 64-bit.
TRY BELOW SOLUTIONS.
SOLUTION 1:
-> Run Android Studio as Administrator (this is only required for first run or when any issues arise due to automatic updates on any run in future).
Though it shows API 23 is or any other updates are not installed (and wouldn't show any 'Retry' button), BUT still the download and installation of rest of the updates would proceed (you can see the download progress incrementing even after seeing the above errors). So, DO NOT ABORT the operation.
-> At the end of installation (after rest of successful updates are installed) it would this time display the "Retry" button to retry installation for API 23 or any other versions which had failed earlier. Then click the "Retry" button, it would work this time.
This would resolve your issue with successful installation.
-> Next time onward no need to run Android studio as Administrator, unless it does any automatic updates and shows similar issues.
SOLUTION 2:
-> Alternative approach is to install any updates (which ever failed in earlier attempt) from Android SDK Manager first and then later launch Android Studio (which would not need any check for updates and any additional installations).
To install any features or updates, run Android SDK manager as administrator (run as administrator is not mandatory for this but preferred to avoid any permissions related issues) and check the required options and proceed with the installation without any issues.
SOLUTION 3:
-> If still your issue is not resolved, then try the proxy solution as suggested by others or check your internet connectivity if it's working properly or not.
*Any of the above solutions should resolve your issues.
go to c->users->[Your user account]-> remove android 1.2 and restart the android studio
when it ask to import select first radio button which is import setting from previous config
there you go fixed
I am using Windows 7 Professional and I was having same problem #Bayu Mohammad Lufty not worked for me.
I simply delete .AndroidStudio1.2 from my C:\Users\UserName\ and restart my Android studio again.
It open Android Studio perfectly!
It configured everything again in next start :)
I'm a MacOS user.
I solved it by uninstalling Android Studio and reinstalling it again.
If you want to try this link helped me a lot.
Uninstall Android Studio MacOS (terminal)
When you are installing Android Studio, under Install type do not use standard setting, use custom setting instead, and check all the option boxes in the next step.
i have solve my same problem
i update my android studio, and i choose not to import my setting from my previous version than that problem appear.
than i realize that i have 2 AndroidStudio folder on my windows account (.AndroidStudio and .AndroidStudio1.2) and on my new .AndroidStudio1.2 folder there are no other.xml file.
than i copy other.xml file from C:\Users\my windows account name.AndroidStudio\config\options to C:\Users\my windows account name.AndroidStudio1.2\config\options
and that how i solve my problem.
I'm using UBUNTU and I got this same error. I restarted the set up using sudo and did a custom install. This solved my problem!
--More Specific--
re-installed using # sudo ./studio.sh
then I made sure to click "Custom Install"
then I made sure all packages were selected.
And I got this message Android virtual device Nexus_5_API_22_x86 was successfully created
I just run:
C:\Users[Username]\AppData\Local\Android\sdk\SDK Manager.exe
Install SDK Platform Android M Preview
And run Android Studio again.
It's working for me :D
When this error occured I first clicked retry for few times and waited for 2 minutes and clicked 'retry' then it installed without any error.(for 2 minutes I was searching to solve this problem online).
I was getting an "out of space" error, which left me scratching my head as I had plenty of disk space, until I realized that it ran out of space on /tmp, which on Arch Linux is mounted on a tmpfs with a size limit.

Categories

Resources