It seems something changed recently for Android Studio imports. I now get two different dialogs that perform different workflows within Android Studio.
Sometimes I get this dialog:
And other times I get this dialog:
This second dialog seems to appear when I import Android code even if it didn't come from Eclipse originally. I know the code in question didn't come from Eclipse because I have imported older projects that I created using IntelliJ IDEA.
Does anyone know what Android Studio looks for when importing projects to bring up one dialog or the other?
Thanx in advance.
At the present time it looks for the presence of an AndroidManifest.xml at the root directory of the project, and also the existence of either the .classpath and .project files (which are Eclipse project files) or the res and src directories.
This will likely change in future versions.
Related
So i'm making the switch from eclipse to Android studio, but something that irks me is I can't seem to find where my files are located? In eclipse, right before it boots up, it allows you to pick where they will be, which made it easy for managing and tracking them. Is there a way to do this in android studio?
Yes! If you start a new project it will show project location, you can choose any location you want to save your project.
You can Copy/Paste your Eclipse Project in any folder and reopen it with Import Project (Eclipse ADT,Gradle,etc.).
I am trying to learn about native Android, using NDK.
I find some sample projects in NDK folder and on the Internet. After much configuration, they are runnable.
But, my problem is: when I open a .c or .h file in JNI folder with Eclipse (just want to see what it is), Eclipse shows many error in this file. For example, it don't know what is JNIEnv, jobject, jstring.
I haven't made any change in the project, just opening it. Errors mean I can't rerun it again except if I delete it from the workspace then reimport it.
Eclipse does not work well with C/C++ files. At least, for me it did not.
After some search, I have managed to configure Code::Blocks to support NDK, please see this answer to the question:
Need a simple Linux C++ IDE (Android NDK) .
Okay I am starting to give up with this. I have been trying to setup sebversion in Eclipse for my android project. I have been following the following tutorial
http://blog.bauson.com/eclipse-subclipse-svn-hostgator-com.html
I got the following:
Created a repository called myRep
Created a project under with source files myRep/TestProject and attached it to trunk
installed subclipse and got it to grab the repository
Now when, it says "Checkout as a project configured using the new project wizard", I get to choose the type of project. If I choose android application project then it creates a default android project and nothing is checked out. But when I choose General Project, it does grab the whole thing in the following structure
Repositony->TestProject->Trunk->All my android files and folders
However I want it to be android project so I can compile and run it. I did a lot of googling and I need your help pleeease!
Never mind, I figured it out. Apperently, when you choose the repository you have to right click and click refresh and it will show you a list of Folders (stupid eclipse does not do it automatically). Then you choose your project and create it as a new project. Voilla, you get it compiling and running
I've been banging my head off my keyboard all day trying to figure out how to import one of the core/system apps in the AOSP into Eclipse to edit/debug it (in this specific case, the Settings app in Android 4.0.4).
I've followed numerous guides on the subject, including this one here which got me VERY close, but the code is still returning 167 errors.
Anyone have any experience or insight with this problem?
Thanks!
This is how I have done it. Use eclipse to edit/browse/debug platform code using an eclipse project. To build the platform, I use terminal and build the whole image or build specific folder (i.e. Using mm helper).
To create eclipse project for AOSP sources, please check Using Eclipse to edit/browse AOSP.
I feel a bit stupid since I develop android apps for a while now. My problem is that I can't get the ApiDemos to work with Eclipse.
Please have a look at the screenshot of my errors I get in Eclipse:
http://cheat-database.com/android.png
It looks like it can't find the xml files in the ApiDemos project. Although everything looks fine to me.
Any suggestions what I might be doing wrong?
Other (own) Android applications work fine in Eclipse.
Thanks a lot for help.
Do this: In Eclipse, File->New->Project, then either type the word "sample" in the filter text field or select Android->Android Sample Project and you will see all the projects such as ApiDemos, NotePad, etc.
The R.java is an automatically generated file. It is updated/re-generated whenever layout files, etc are changed.
I'm going to assume you tried to set up the project directly from the samples. I've seen that cause issues with write access if you don't have the privileges, and it doesn't seem to play nice when I try it either.
One thing to try would be copying the relevant ApiDemos folder to an alternate location and then try creating a new android project from that folder as follows:
Create -> New Android Project -> Create Project From Existing Source
Then point it to the location and select the relevant SDK.
It's not ideal, but at least it might get the application generating and running possibly.
Clean the project and build it again...I hope it would solve the issue
when you File->New->Other->Android Project from Existing Code, you have to tick "Copy projects into workspace".
got the same issue today :-(
this way gave me a solution very easy to use with ADT (eclipse) :
click on New Project icon --> Project --> Android --> Android Sample Project --> Next --> Select Target (for me Android 4.4) --> Next --> and then select the sample project you want to import in Eclipse (for me : legacy > ApiDemo) --> Finish
it works fine for me, i hope that could help someone :-)
#+Mathieu