1

So far Android studio has handled this, but it is not infallible.

Given the information of target build version (27) and which components I require (TabViews with Fragments, but no need for swiping), where can I find the information required to determine what goes in the module build.gradle dependencies?

nsandersen
  • 896
  • 2
  • 16
  • 41

3 Answers3

1

This might not be the solution, but a little help. Here are two links that list the libraries.

Android Support libraries: https://developer.android.com/topic/libraries/support-library/packages

Android X libraries: https://developer.android.com/jetpack/androidx/migrate

So if you build fails because of missing classes, you can check here and add the fitting dependency.

Also note that Android Studio lets you auto-migrate to Android X (Refactor > Migrate to AndroidX).

Richard R
  • 873
  • 6
  • 20
  • It seems like the general solution - and searching that page for problem classes gave me dependencies to try step by step by changing the version from 28.0.0 to 27.1.1, which worked. – nsandersen Jun 16 '19 at 17:38
0

You can check for official documentation or check this link: https://material.io/develop/android/

If you are not using androidx then add this library

implementation "com.android.support:design:27.1.1"

else you can use this:

implementation "com.google.android.material:material:1.1.0-alpha05"

Sujin Shrestha
  • 1,203
  • 2
  • 13
  • 23
  • I had a different version of the first one, but neither seems to work. With the second one it says: Could not resolve com.google.android.material:material:1.1.0-alpha05. Will read the link on the train. – nsandersen Jun 11 '19 at 06:23
  • For second one, your project needs to be on `androidx` – Sujin Shrestha Jun 11 '19 at 08:35
0

Few ways to update to the dependency version you need or how to include one -

  1. (Only for IntelliJ platforms) Go to the gradel (app) there you'll see yellow ballons and marked lines which will automatically ask you to update it on mouse hover. For which click the balloon to see further options

For an older version

Image for an older version

  1. Check for official documentations from Google

https://developer.android.com/guide

Saswata
  • 1,290
  • 2
  • 14
  • 28