I re-installed my Windows10 OS and installed the latest update of Android studio. I then opened a stored zip file of my project into Android Studio. I created a lot of changes and now want to upload these changes to the existing project on Github. But if I try to "Share project to Github" it tells me that the project already exists. I already know that. What I want to do is to merge this as a branch to the project that already exists. How do I do this?
Related
I have an existing flutter app. I cannot see the android folder in the project. It is there in the directory and in Git. One of the problems is that when I commit my changes through the built in version control, Idea does not see my changes and does not commit them.
How do I include the android folder?
I am quite new to Idea
This question already has answers here:
What should be in my .gitignore for an Android Studio project?
(31 answers)
Closed 3 years ago.
Scenario:
I'm working through the exercises in an Android programming book.
I finish "Chapter 10", so I "Close Project" and exit Android Studio, manually delete build/* and copy "chap10" to a new folder, "chap11".
I start Android Studio > Open Existing Project > chap11.
So far, so good. Everything looks fine.
I start editing a .java source file or .xml layout file in chap11 ... and Android Studio overwrites the old files in the old directory instead (?!?)
Q: What causes this behavior?
Q: What can I do to make Android Studio "forget" everything about the old "chap10", and use ONLY filepaths from the new "chap11" instead?
I'm using Android Studio 3.5, Build: Aug 8, 2019.
I found the answer here. After copying the directory, I delete all of the following (and let Android Studio recreate them on gradle build):
https://stackoverflow.com/a/24679853/421195
app/build/*
.gradle/*
.idea/*
*.iml
local.properties
I think almost everyone agrees about /build.
I got sick of constantly seeing messages about the various library.xml
files that Gradle creates or deletes in /.idea. The build.gradle will
run on the developers's local when they first check out the project,
so why do those XML files need to be versioned? Android Studio will
also generate the rest of /.idea when a developer creates a project
using Check out from Version Control, so why does anything in that
folder need to be versioned?
If the *.iml is versioned a new user will have to name the project
exactly the same as it was when committed. Since this is also a
generated file, why version it in the first place?
The local.properties files points to an absolute path on the file
system for the SDK, so it definitely shouldn't be versioned.
I use this Android studio import existing project all the time and everything goes well. Today ,I first create new project which support c++ ,and after every step to the final, I got the error.Picture like below:
I don't know what's wrong,because when I importing existing project ,this error haven't shown.
And the project structure panel like below:
When I check connection in "Http Proxy" ,it returns successful :
Delete the corrupt files
When Gradle files are not completely downloaded or corrupted by some other reason,we have to redownload the files. The easy way is to delete the old files in.
C:\Users\username.gradle\wrapper\dists
Then rebuild the project.
Then Android Studio will automatically download the new files from the system.
I was working on a project in Android Studio when I update my Android studio to latest stable version. After updating Android studio, it prompted me to update Project build.gradle for the project (from com.android.tools.build:gradle:2.1.3' to com.android.tools.build:gradle:2.2.0'.
Since then most of the files are in grey colour and are not showing File Status in Views and Line Status in the Editor on making modifications to the files. It used to highlight all changes to the files since the last synchronisation with blue colour.
I have tried to revert to com.android.tools.build:gradle:2.1.3', that didn't work. Then I tried deleting.AndroidStudio and .gradle folders from user folder, reinstalling android studio and also deleting the project from the directory and cloning a fresh copy from Github.
That fixed it for once when imported the project in the Android studio for the first time, but the problem came back after a restart.
I have checked, There are no changes to the code on GitHub that could have cause it. I only did changes to resource files
It's working fine on other projects, and just this project is having the issue so far.
I believe this is a bug in Android studio's latest update, so I have also reported the bug on Android Studio bug tracker.
https://code.google.com/p/android/issues/detail?id=223359&sort=-opened&colspec=ID%20Status%20Priority%20Owner%20Summary%20Stars%20Reporter%20Opened
Hi I had the same problem and it is solved for me in this way:
https://stackoverflow.com/a/41211805/1498586
I don't know why it change to C++ because I only need Java.
How can I change to Java?
I had the same problem after importing an empty git project. Android studio did not set the project to be a Java project.
I solved this with the following steps:
create a new Java project with Android Studio
copy the generated files to another folder
clone the git repository into the, now empty, project folder
copy the generated files back into the project folder
Though the response is late, I hope this will help others with a similar problem.