Last active
August 30, 2020 00:48
Revisions
-
daniellevass revised this gist
Mar 29, 2015 . 1 changed file with 10 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -53,6 +53,16 @@ You'll also need to remove `applicationId` in `defaultConfig` before synchronisi ## Add Library project into useful app ####1. settings.gradle  ####2. build.gradle  > ## Conclusion -
daniellevass revised this gist
Mar 29, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # Getting Started with a library project in Android Studio So we're working on creating Android Material Awesome, a library which will hopefully incorperate the benefits of Material Design, Twitter's Bootstrap, and FontAwesome. What we really wanted is a **project other people can easily include into their projects using gradle dependencies**. To do this we needed to create a standalone library project so we could make it as lightweight as possible for including as a dependency, and a sample app that would use it for testing. These are the steps we took to get started in Android Studio (version 1.1). ## Create Projects -
daniellevass revised this gist
Mar 29, 2015 . 1 changed file with 9 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,22 +8,23 @@ The first thing we needed to do was to create **two** new projects, with all the ## Fix Up Library Project ####1. Rename Module Initially we'll focus on our library project. Annoyingly Android Studio automatically creates you a module called `app`. Modules really should be uniquely named, so you'll need to right click on the module name, click `refactor` and rename to something useful. We called ours `library`. ####2. Rename Folder Unfortunately, this doesn't fully rename the root folder. So using Finder (OS X) or File Explorer (Windows), you'll need to navigate to the module folder. Rename it to match what you named your module you named it e.g. `library`.  > Android Studio calls my module library, but Finder still says app ####3. Drag build.gradle into Android Studio This'll break your project! To fix it, you need to go back to Android Studio, and open the build.gradle for the module. It'll have a little warning at the top asking you to add it to the project. Click this and wait for gradle to synchronise again! All your files should magically reappear again!  > Drag the highlighted file back into Android Studio ####4. Synchronise -
daniellevass revised this gist
Mar 29, 2015 . 1 changed file with 4 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,9 +17,6 @@ The first thing we needed to do was to create **two** new projects, with all the Initially we'll focus on our library project. Annoyingly Android Studio automatically creates you a module called `app`. Modules really should be uniquely named, so you'll need to right click on the module name, click `refactor` and rename to something useful. We called ours `awesomematerial`. Unfortunately, this doesn't fully rename the root folder. So using finder or file explorer, you need to navigate to the module folder. Rename it to whatever you named it e.g. `awesomematerial`. @@ -28,10 +25,12 @@ This'll break your project! To fix it, you need to go back to Android Studio, an ===== ####4. Synchronise You should see a yellow/gold banner appear at the top of your file, click it to add file to your project and wait for Android Studio to synchronise. Once it's done, you should see all your files have magically reappeared again!  > click the yellow/gold banner at the top to add file to project and synchronise ####5. Make Android Library -
daniellevass revised this gist
Mar 29, 2015 . 1 changed file with 5 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,6 +32,9 @@ This'll break your project! To fix it, you need to go back to Android Studio, an  > Drag your build.gradle file back into Android Studio and click the yellow/gold banner at the top to add to your project. All your files should magically reappear again! ####5. Make Android Library Whilst you still have your `build.gradle` file open, you'll need to change the first line : `apply plugin: 'com.android.application'` @@ -40,6 +43,8 @@ to say: `apply plugin: 'com.android.library'` ####6. Remove applicationId You'll also need to remove `applicationId` in `defaultConfig` before synchronising again.  -
daniellevass revised this gist
Mar 29, 2015 . 1 changed file with 10 additions and 7 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,13 +14,7 @@ The first thing we needed to do was to create **two** new projects, with all the 2. Rename folder in Finder / File Explorer 3. drag build.gradle into Android Studio 4. Synchronise @@ -32,12 +26,21 @@ Unfortunately, this doesn't fully rename the root folder. So using finder or fil This'll break your project! To fix it, you need to go back to Android Studio, and open the build.gradle for the module. It'll have a little warning at the top asking you to add it to the project. Click this and wait for gradle to synchronise again! All your files should magically reappear again! =====  > Drag your build.gradle file back into Android Studio and click the yellow/gold banner at the top to add to your project. All your files should magically reappear again! Whilst you still have your `build.gradle` file open, you'll need to change the first line : `apply plugin: 'com.android.application'` to say: `apply plugin: 'com.android.library'` You'll also need to remove `applicationId` in `defaultConfig` before synchronising again.  > The end library build.gradle file -
daniellevass revised this gist
Mar 29, 2015 . 1 changed file with 11 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,6 +14,17 @@ The first thing we needed to do was to create **two** new projects, with all the 2. Rename folder in Finder / File Explorer 3. drag build.gradle into Android Studio 4. Synchronise 5. Whilst you still have your `build.gradle` file open, you'll need to change the first line : `apply plugin: 'com.android.application'` to say: `apply plugin: 'com.android.library'` 6. ssss Initially we'll focus on our library project. Annoyingly Android Studio automatically creates you a module called `app`. Modules really should be uniquely named, so you'll need to right click on the module name, click `refactor` and rename to something useful. We called ours `awesomematerial`. @@ -24,13 +35,7 @@ This'll break your project! To fix it, you need to go back to Android Studio, an  > Drag your build.gradle file back into Android Studio and click the yellow/gold banner at the top to add to your project. All your files should magically reappear again! 6. You'll also need to remove `applicationId` in `defaultConfig` before synchronising again. -
daniellevass revised this gist
Mar 29, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,8 @@ The first thing we needed to do was to create **two** new projects, with all the ## Fix Up Library Project 1. Rename module in Android Studio 2. Rename folder in Finder / File Explorer 3. drag build.gradle into Android Studio 4. Synchronise -
daniellevass revised this gist
Mar 29, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,15 +22,15 @@ This'll break your project! To fix it, you need to go back to Android Studio, an  > Drag your build.gradle file back into Android Studio and click the yellow/gold banner at the top to add to your project. All your files should magically reappear again! 5. Whilst you still have your `build.gradle` file open, you'll need to change the first line : `apply plugin: 'com.android.application'` to say: `apply plugin: 'com.android.library'` 6. You'll also need to remove `applicationId` in `defaultConfig` before synchronising again.  > The end library build.gradle file -
daniellevass created this gist
Mar 29, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,44 @@ # Getting Started with a library project in Android Studio So we're working on creating Android Material Awesome, a library which will hopefully incorperate the benefits of Material Design, Twitter's Bootstrap, and FontAwesome. What we really wanted is a **project other people can easily include into their projects using gradle dependencies**. These are the steps we took to get started in Android Studio (version 1.1). ## Create Projects The first thing we needed to do was to create **two** new projects, with all the default settings (Blank Activity etc). One for our sample app, and one for our library. We added both of ours into the same GitHub repo, however you can save them wherever you like. ## Fix Up Library Project 1. Rename module in Android Studio 2. Rename folder in Finder / File Explorer 3. drag build.gradle into Android Studio 4. Synchronise Initially we'll focus on our library project. Annoyingly Android Studio automatically creates you a module called `app`. Modules really should be uniquely named, so you'll need to right click on the module name, click `refactor` and rename to something useful. We called ours `awesomematerial`. Unfortunately, this doesn't fully rename the root folder. So using finder or file explorer, you need to navigate to the module folder. Rename it to whatever you named it e.g. `awesomematerial`. This'll break your project! To fix it, you need to go back to Android Studio, and open the build.gradle for the module. It'll have a little warning at the top asking you to add it to the project. Click this and wait for gradle to synchronise again! All your files should magically reappear again!  > Drag your build.gradle file back into Android Studio and click the yellow/gold banner at the top to add to your project. All your files should magically reappear again! 5. Whilst you still have your `build.gradle` file open, you'll need to change the first line : `apply plugin: 'com.android.application'` to say: `apply plugin: 'com.android.library'` 6. You'll also need to remove `applicationId` in `defaultConfig` before synchronising again.  > The end library build.gradle file ## Add Library project into useful app ## Conclusion Now you can create all the library projects you want to and use them in any of your other apps! We'll probably write another post depending on how hard it is to publish our library into bintray ( https://bintray.com/howbintrayworks )