Develop your own SDK tutorial using Android studio
Since I haven't been in the habit of blogging before, I haven't left anything substantive when I look back over the years, so I decided to write something from today. Recently, I just started to develop SDK. Let's start with a brief introduction. Today we will introduce the first sdkdemo development using Android studio.
1. First create a project using Android studio (omitted here);
2. Create a new module in the project; Create a new class file, and then add a method, for example:
3. Add the following contents to the gradle of the module (Note: the outermost layer of the file is added), as shown in the following figure:
4. Click sync now. After Android studio runs, click the gradle button in the upper right corner, as shown below:
Then click on our module (that is, the previously built SDK Library). The name you choose is the name. Click on other and then expand the method to find our makejar, as shown in the figure:
5. Double click the makejar button. When the operation is finished, you can see that the classes.jar file is generated under the build / intermediates / bundles / default / folder. At the same time, there is also the test.jar file in the build / LIBS / directory. Even if it is completed.