Posts

Showing posts from March, 2017

Issue : Gradle Plugin Version is not in sync with Android version

Image
1. On execution of your android application, if the below issue occurs -  Gradle Plugin Version is not in sync with Android version 2. This means you need to update your gradle version. 3. In order to resolve the problem  Open Android studio Go to File -> Project Structure -> Project Here you will see, version of Gradle and Android- 4. In order to change that the version, go to below mentioned link- https://developer.android.com/studio/releases/gradle-plugin.html Here, you will see the compatible versions given in tabular format- 5. Update the Gradle version as suitable. 6. After updating, Android Studio will start syncing process.  7. Go ahead and run your application.

Spinner for Dropdown

Image
Spinner helps you to display the set of data (collection). It allows teh data to be displayed in drop down fashion. Example: 1. Lets define a static String array in Android XML file. <? xml version= "1.0" encoding= "utf-8" ?> < resources > < string-array name= "countries" > < item >India</ item > < item >U.A.E.</ item > < item >Nepal</ item > < item >China</ item > < item >Australia</ item > < item >United States</ item > < item >Europe</ item > < item >United Kingdom</ item > < item >Australia</ item > < item >Canada</ item > < item >Japan</ item > < item >Singapore</ item > </ string-array > </ resources > 2. Configure Spinner in your activity