Skip to content

Gradle Dependancies in Android 3.1.3 #21

@jgebbeken

Description

@jgebbeken

If you want to use the latest versions of the libraries, here what you must do.

compile is going to be replaced with implementation soon. Compiler gives warnings regarding that so you should change it.

Testing-only dependancies should be changed from androidTestCompile to androidTestImplementation

com.google.android.gms:play-services-appindexing:x.x.x is obsolete as it is replaced with com.google.firebase:firebase-appindexing:x.x.x where x.x.x is the version you need.

Here is a changed version that uses the latest libraries. Anything with the $ in it is a String value that you can change if a new version comes out for those.

`dependencies {

def espresso_version = "3.0.2"
def android_support_version = "27.1.1"
def android_support_test_version = "1.0.2"
def firebase_version = "16.0.1"

implementation "com.android.support:design:$android_support_version"
implementation "com.android.support:support-annotations:$android_support_version"
implementation "com.google.firebase:firebase-appindexing:$firebase_version"
implementation "com.android.support.test.espresso:espresso-idling-resource:$espresso_version"

// Testing-only dependencies
androidTestImplementation "com.android.support:support-annotations:$android_support_version"
androidTestImplementation "com.android.support.test.espresso:espresso-core:$espresso_version"
androidTestImplementation "com.android.support.test.espresso:espresso-intents:$espresso_version"
androidTestImplementation "com.android.support.test:rules:$android_support_test_version"
androidTestImplementation "com.android.support.test:runner:$android_support_test_version"

}`

Change compileSdkVersion 25 to compileSdkVersion 27

The static imports would be highlighted in red on the InstrumentedTest java files. Just delete the static imports and add each one. Can alt + enter on items you have your cursor on that are needing imports.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions