the question is not as simple, as replied in
Android Studio moving project to another computer?
Just copying folder results in my case in Studio could not find SDK location, rebuild does not help as errors could not find ...-appcompat-7 appear. Studio advices to load SDK, which I do not want to do as I already have SDK on that comp.
And all that just because computers have different user accounts - hence default SDK location path differs.
Is there safe simple way to copy and/or backup my work in Android Studio?
If you use source control, an easy way might be to make sure all your changes are on the server, then clone the project on your second computer.
copy the previous SDK to your new computer with project, And set location of new SDK and refresh the project
What a program Android Studio! The issue I found is that in Gradle file appcompat was last digit different version, hence asking for download and looking on Studio server could not find old version.
I already raised ADV bug to Studio support sometime ago and got no response except that it was read.
So be it, hope somebody else will find out my answer here if faced with same issue.
I solved this problem by changing the compileSdkVersion and buildToolsVersion from the build.gradle(module) of the project.
Related
I am using Android Studio 3.1 on Ubuntu 18.04 LTS. I'm currently working on a project with target API 28. I've downloaded the SDK with API level 28 during installation but sometimes when I try to run my project on my device, a popup dialogue prompts me to select the SDK. This does not happen every time but happens sometimes even if I've run the project before and made no change to the SDK path. I don't know what triggers this. I've seen similar questions on StackOverflow, but none of the solutions work for me. Here's what I have done so far:
Synced my project
Invalidated cache and restart
closed my project and opened it again
Uninstalled my SDK and downloaded it again
Switched back to an older version of SDK and then back again
But none of this works and the only workaround I found was to open another project that I downloaded from Github (with API 26), build it and then go back to my current project. This solves it temporarily. A few of my friends are working on the same project on different machines (Windows, Mac) and they have this problem, too.
Is this a bug with AS or is there a permanent solution?
File->Settings->Android SDk.
If already was there in your system set the path to that otherwise download the SDK from SDK tools by selecting specific name.
I've found this workaround. It is not perfect, but it works. Hope this this will be helpful for someone else.
Move your project folder to another location and then open it. It resolves the problem.
I have tried so far every solution; clean, change the namespace etc. I still cannot get this resolved.
I have created an Android project with API 19 and it creates another project alongside mine called appcompat_7. This project has quite a few erros and one of them is " article_view cannot be resolved or is not a field ".
The following files have the errors;
ArticleFragment.java
HeadlinesFragment.java
MainActivity.java
All of these files seem to have issues with R.layout.*
I am not sure what would resolve this issue at this point as this is completely new project and I have tried almost every API above 17 and each project has definitely an error that does not get resolved with clean etc. I am using Eclipse Luna and I am sure I was able to install the correct SDK.
As a note: Am I the only one who thinks this IDE for Android is somewhat messy and not friendly at all?
Thank you for any insight.
Edit:
I solved the problem by trying API 18 for both compiler and target. It did not create the appcompat_v7 project so I just fixed the dependencies and changed the namespaces. I still think Eclipse is not working well with Android plugin.
I was also stuck with the same issue few day ago,
I resolved the same issue by updating sdk to latest version 23.0.4. and extras: Android support Repository to rev. 6 Android support Library to rev. 20
first of all open up your Android sdk Manager from eclipse and download all latest sdk updates and extra downloads.
And then after downloading all updates , you have need to use a fresh Eclips editor because your existing eclipse will not let you successfully update from Android sdk tool 20 to 21.0.4 Then just use a fresh eclips editor and set up updated android sdk path in the fresh eclips (the same one you have used in your last eclipse editor , you can find it at Window>> Prefrences >> Android).
Hopefully this will solve your problem.
Please see below. I have a feeling I've got the SDKs configured incorrectly, but I'm not sure how to solve it. I tried Googling for answers but no one had this exact problem.
Do I have the wrong Java version maybe? It seems like the two SDKs might be conflicting with each other.
I made this project via:
Create New Project
Android > Application Module
Defaults and Finish
Edit: See screenshot. I got it working. All I did was create a new project and re-select the Android SDK. I'm still thinking it was because I added too many SDKs/JDKs the first time. I think all you need is the Android SDK and don't need to add the normal Java one too.
I tried what for3st suggested to no avail at first, but i've heard other places that you should use JDK 1.6 for IntelliJ IDEA in other places, so you can do that here. Also, you set the SDK by going 'File'->"Project Structure" -> "Platform SettingS" -> "SDKs"
In the end, I also switched from Android 2.2 to 2.3.3 (api 10) and that got it to work. Don't have a good idea why it didn't work for 2.2, but since I just want a beginner's tutorial, I'm fine with that.
I had exactly the same problem, but the conditions leading up to it are quite unusual.
I downloaded the Android SDK as a zipfile and unextracted it into /opt.
However, the permissions did not allow normal users to enter all directories or execute all files... so when IntelliJ indexed the SDK it only picked up the res jar... and never added the sources to the library path!
Deleting the SDK, fixing the permissions problem in the SDK, and creating a new reference in IntelliJ fixed it.
Using 3.6.2. When I choose to create a new Android Project, I enter a name, 'FirstProject' but the Finish button remains hollow and I cannot get past creating the project.
I did a little Google research and found a common cause of this is that the support folder that exists in the SDK's extras folder needs to be duplicated and the duplicate named to compatibility. I've done this now, and restarted Eclipse, but this still hasn't fixed the issue.
I also read that Juno causes this problem, but I'm not using Juno.
Has anyone experienced this problem before? Very eager to start an Android App!!
EDIT: A screen of the error:
You need to choose a Build SDK. If there is nothing in that drop-down, please visit the SDK Manager (Window > Android SDK Manager) and download one or more SDK platforms and associated emulators.
Make sure you add the SDK in Eclipse otherwise you will download them all and scratch your head on why they are not working.If you launch SDK manager form SDK folder and not from Eclipse it does not seem to register in Eclipse that you have downloaded these files. Took me several hours for something that should have taken only one or so.
After several years with Eclipse and Android development this combination is driving me nuts.
On every start of Eclipse the lib settings I've configured on the page 'Project/Properties/Android' section 'Lib' need to be re-applied.
After a Eclipse restart all existing projects are marked in red. For every project I have to select that project, change to the page described above, remove all Libs, hit Apply, re-enter the same Libs and hit apply again. .classpath and .project look ok. It's the latest Android SDK and the latest Helios Eclipse release. MotoDEV is installed as plugin.
This is a stupid and time-consuming process. Please, has anybody an idea what's wrong with Eclipse (or the Android SDK) or my configuration?
Many thanks in advance.
Which OS are you using and is it 32- or 64-bit? Are you logged in as root/administrator or as a regular user? This sounds suspiciously like the ~/.eclipse folder isn't getting written correctly. We can look at this in MOTODEV Studio and see if it's something unique to us, but it definitely is strange behavior.
Update: one of the MOTODEV Studio team says this is a known bug in ADT when using linked folders. http://code.google.com/p/android/issues/detail?id=14217