I've been searching the web for half a day now but I just can't figure out how to create a new Android Library with Android Studio.
I've tried doing things like this: How to create a library project in Android Studio and an application project that uses the library project
But when I enter the New Module menu it just says "Nothing to show".
I can't find out why or how to fix it.
Is there a way to manually add a library? If so, how?
I'm trying to add an import method to my app so users can import a preferably rar file or just a folder to be used in the app.
TL;DR: How can I add the option Android Library to my New Module menu inside Android Library?
EDIT: To clarify things; I've made a web app in which u can create your own click/touch-able interface. The projects u make with that app can be exported to a rar file which is basicly a webpage with html, css and javascript that runs the project. I can run that webpage in my android app just fine but I need other users to be able to import the files somehow. So I was thinking about using a file manager so users can import the files into the app. I'm working with this one a.t.m. https://code.google.com/p/afiledialog/ but it needs to be a library.
Updated my Android Studio today and guess what, it's fixed!
So anyone who has this problem just update asap. Tried this on Mac and Windows and it now works on both.
PS: I'm on version 0.2.6 now (version of august 24). Guess I was one day too early with the question :P
Related
i want to work with web V.R. in android studio. i found that i should use gecko view or chrome view or something like them. but i cant find anything in the web. all the references are belong to eclipse and don't work with android studio.
alternatively i put my files in external storage and load them with chrome but it didn't work properly.
https://crosswalk-project.org/documentation/downloads.html
https://github.com/pwnall/chromeview
I use these but i cant run my project
you can import eclipse library project in android studio as well. Please refer to this link
Why don't we have a file similar to the .xcodeproj (for XCode applications) or an .xds (for Sencha Architect Projects) for our Android Studio Project?
I'm pretty sure a good number of you here have experienced the frustration of trying to import a project you see online in order to piece it apart better and learn how it works. I get that we are supposed to Import Android Projects built using Eclipse and Open Android Projects built using Android Studio.
However, why is it that we have to go through File -> Open -> then pick out the directory of the Android Studio app that we want to open? And the thing is, Android Studio doesn't seem to know it's an Android Studio project until it tries to open and build it. In the screenshot I have below, I have the sample Android Studio projects of ARToolKit, but I've only imported two of them.
As you can see, only those I've imported "can be seen as an Android Studio Project" as indicated that they have the Android Studio logo instead of a Folder.
This can be an issue for those just starting to develop in Android Studio on their own and they try and use existing projects (build from Eclipse or Android Studio) and they hit a snag with just trying to import the projects for reference. They might not know that they should import the folder and not the projectname/src subfolder. It adds to the "steep learning curve" that Android Development has if opening/importing projects aren't streamlined to a degree.
To sum up, my question is:
Why don't we have a single file that we can open that would in turn open Android Studio and import and build the project if it isn't built yet?
Android is not iOS. iOS development is only possible in xcode, hence it makes sense they added a shortcut to open it in xcode directly with a .xcodeproj file. Make life easier for iOS developers.
Android development however can be done outside of android studio as well. Eclipse is just one example, there may be other IDE's that support this. This is possible because android has standalone SDKs and tools that third party applications can use. iOS does not.
Imagine you are working on an android project in android studio. Then your boss tells you someone from 3000km away is going to help you. This guy may be using android studio, but maybe he isn't. When there are multiple options that developers can choose from individually, you do not want to pollute version control with files that you are using, but others may not care about. Each their environment.
This is merely a logical conclusion that you can come to by comparing. The "real" reason why this was done can only be answered by the people that created (adapted intellij) android studio.
This has been very frustrating to me too.
I try to give you a "beta" answer, waiting somebody to confirm it to me.
An Android project is just the composition of many parts that in some cases are concurrent to create the apk file.
It's just like what happens for the whole java projects: you have the main/src/java, the main/src/test, the maver or gradle files, the gradle or maven wrapper, the manifest, the configuration etc.
So you won't have a single project, but a series of folders that can contain many "flavours" or "versions" of the product itself.
The only help it is given to us is the Android studio icon that appears if a folder contains an android project in its subfolders.
I don't know if I have really answered to you, I just have given you my impressions and my thought.
I found a few questions asking how to get the source code from the AOSP running in Android Studio. However, I could not find any explanation on how to import only a single application of the AOSP.
I am trying to do it for the Dialer application which can be found here. However, I had only minor success, I was able to import the code as a project, but didn't manage to set up dependencies and required libraries and all that.
Can anybody tell me if it is possible, and if so, how this is done?
UPDATE:
It seems impossible to achieve this with the code that i found and which was part of the full android distribution of google. But google decided to distribute the Dialer application just like any other application via the playStore. So there should be a possibility to find this code, IF it is also running under the open source project.
You can only open the whole AOSP inside Android Studio.
After you finish building the source do make idegen && development/tools/idegen/idegen.sh inside your root folder and then open the new android.ipr in your root via Android Studio.
AOSP code you are looking is not Android Studio compatible, It's an Eclipse project.
I have a unity android application which I exported from unity, I wish to integrate it into my existing application using android studio. How would I go on to do this?
I have the same problem, the first thing I did was export the unity project by File->Build & Run->select android then switch platform->tick google android project->export after that just import the project into Android Studio and it will handle the build, by then you can access the source code. Currently I'm still working on it to meet my specific needs.
wow. Such a hard task, you can try opening up apk and implementing it in your project. But this is gonna be so painful and you might not get it to work if you are not experienced!!!
I have some apps in eclipse and I exported my apps, but when I import all apps again, and when I import it, I have 1 error in Androidmanifest.xml (for the package name) and the code has not appeared. I have not updated my SDK manager. Could that be the problem?
I tried to put the project name in the manifest, and I don't get more errors in it, but when I export, it doesn't save all my information/configuration.
I was having a similar problem. I am a novice to android studio and to creating android apps. I downloaded sample apps from the android site but could not get it to run inside of android studio. What I was doing was allowing the android studio ADT to convert the project. This was a mistake. I ended up importing the project but not allowing the ADT to migrate any part of the unzipped project file. Once I did this the ability to run the apps was there and I just had to link the dependencies via the project structure option under File in the top toolbar and then worked out minor issues that were mentioned in the console of the log. This is probably a different issue than what is discussed here but it does relate to the importing and running of android apps.