Page 146

Android Programming Cookbook

138 / 143

>

8.7

Composing build.gradle file

We should add the AppCompat V7 support support library in our project. We can this as a dependency to our application via build.gradle file. build.gradle apply plugin: ’com.android.application’ android { compileSdkVersion 23 buildToolsVersion "23.0.2" defaultConfig { applicationId "com.javacodegeeks.examples.androidViewPagerExample" minSdkVersion 14 targetSdkVersion 23 versionCode 1 versionName "1.0" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile(’proguard-android.txt’), ’proguard-rules. ←pro’ } } } dependencies { compile fileTree(dir: ’libs’, include: [’*.jar’]) compile ’com.android.support:appcompat-v7:23.1.1’ }

8.8

Build, compile and run

When we build, compile and run our project, the main AndroidViewPagerExample should look like this:

SKY MAGZ  

This is Yahya Christian School Magazine

Read more
Read more
Similar to
Popular now
Just for you