RestAdapter (retrofit) not resolving in android

前端 未结 4 1570
伪装坚强ぢ
伪装坚强ぢ 2020-12-03 04:39

So I am trying to use Retrofit for my project. As the site says I have included compile \'com.squareup.retrofit:retrofit:2.0.0-beta1\' in build.gradle

4条回答
  •  心在旅途
    2020-12-03 05:29

    You have two options:

    1) Use stable Retrofit 1

    This has the RestAdapter class you need.

    compile 'com.squareup.retrofit:retrofit:1.9.0'
    

    2) Migrate to Retrofit 2

    The RestAdapter class was renamed to Retrofit and the API was completely remade. Read more in Jake Wharton's presentation.

    compile 'com.squareup.retrofit:retrofit:2.0.0-beta1'

    As of June 30 2016 the latest version is 2.1.0 obtained by

    compile 'com.squareup.retrofit2:retrofit:2.1.0'
    

    Please check http://square.github.io/retrofit/ for updates.

提交回复
热议问题