compile 'de.timroes.android:EnhancedListView:X.Z.Y'Unfortunately not all projects are hosted like this and occasionally you'll have to include the project the old fashioned way, as a library.
Android Studio's documentation has been a little light, but since it's only just made it to Beta, I'll give it a pass. Up to this point I've always been a little confused as to how to include a project, but having figured it out last night I thought I'd include a quick explanation here (to remind myself in a couple of weeks as well).
1 - Open Android Studio and go to File --> Project Structure
2 - Click the + button to add a new module
3 - Select Import Existing Project and next
4 - Enter the project location and click Finish
5 - Go to the root Settings.Gradle file and make sure the newly imported project is listed there. For some reason (I wish I knew more) make sure the newly added projects are listed above your application.
6 - Go to the your application build.gradle file and under the dependencies section add the following
compile project(___insert name of project from settings.gradle here___)
7 - Sync your gradle files by clicking the following button
OK. That should be it. I've tried it with about 5 different projects and it seems pretty reliable. Be aware, if you decide to remove the project afterwards, just go to project structure and click the minus button on the project. This doesn't delete the project, just the references, you'll have to manually delete the folder with the project files.
Good luck!
No comments:
Post a Comment