Original solution sacrifices new api lint check.
Here my solution:
int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
| import okhttp3.ResponseBody; | |
| import okhttp3.mockwebserver.MockResponse; | |
| import okhttp3.mockwebserver.MockWebServer; | |
| import okhttp3.mockwebserver.RecordedRequest; | |
| import org.junit.Rule; | |
| import org.junit.Test; | |
| import retrofit2.Call; | |
| import retrofit2.Response; | |
| import retrofit2.Retrofit; | |
| import retrofit2.http.GET; |
Original solution sacrifices new api lint check.
Here my solution:
int minSdk = hasProperty('minSdk') ? minSdk.toInteger() : 16
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
EDIT: You can find this same updated tutorial here -> Medium
Now I'm going to list how to publish an Android libray to jCenter and then syncronize it with Maven Central:
| import android.content.Context; | |
| import android.os.Debug; | |
| import java.io.File; | |
| public class OomExceptionHandler implements Thread.UncaughtExceptionHandler { | |
| private static final String FILENAME = "out-of-memory.hprof"; | |
| public static void install(Context context) { | |
| Thread.UncaughtExceptionHandler defaultHandler = Thread.getDefaultUncaughtExceptionHandler(); |