Android Support Library Error After Updating to 23.3.0

Android support library error after updating to 23.3.0

For those people who are still facing this problem just add this line to your dependencies.

androidTestCompile 'com.android.support:support-annotations:23.3.0'

It solved my problem.

UPDATE:

If you have this error nowadays, you can just insert the new versioncode (23.3.0 in this case, or 27.1.1 in May '18) as it is described in the error into the above described solution.

Failed to Sync Gradle, could not find com.android.support:support-annotations:23.3.0

Update your Google Repository in SDK ManagerSample Image

android support library v 23.3.0 snackbar issue

I've tested the library in 3 apps that i'm working on, i do not have issues with snackbar, it could be that is the wrong view to show the snackbar, i think you have to call in the CoordinatorLayout.

View mViewCoordinatorLayout = findViewById(R.id.coordinatorLayout);
if(mViewCoordinatorLayout != null){
Snackbar.make(mViewCoordinatorLayout, R.string.someString , Snackbar.LENGTH_LONG)
.setAction("Action", null).show();
}

How to use Gradle's dependency tree to resolve android support library version mismatch?

Specifically, when the tree says "com.android.support:support-v4:23.3.0 -> 24.0.0", what does it mean?

It means that a library has com.android.support:support-v4:23.3.0 as nested dependency but you are just using another and higher version of the same dependencies, in this case com.android.support:support-v4:24.0.0.

In other word your project is using the com.android.support:support-v4:24.0.0

why didn't this build.gradle throw errors prior to the Android Studio, Gradle plugin, and buildToolsVersion update mentioned earlier?

Because you have updated the Gradle plugin to 3.3 that has this kind of check.

How can I make sure all my dependencies are compatible with compileSdkVersion 23?

It is quite difficult to have.

The only way is to check all dependencies, but I suggest you using:

compileSdkVersion 25
targetSdkVersion 23

In general it is a good idea to use the latest version of buildToolsVersion in any case, independently by the version of support libraries used.

Moreover.
It is strongly recommended that you always compile with the latest SDK. It means that today you should use compileSdkVersion 25.

Getting error while adding these dependencies in app/build.gradle file in android

com.android.support:appcompat-v7:23.3.0

Update with Andrioidx library.

Migrate your project with android to androidx then you able to add material dependencies.

implementation 'androidx.appcompat:appcompat:1.3.1'
implementation 'com.google.android.material:material:1.4.0'

After updating Android Studio, my project is giving an error: Could not find com.android.support:appcompat-v7:23.3.0

Open the Android SDK Manager (separately or from Android Studio itself) and make sure you have the API 23 SDK and the "Support Repository" downloaded (scroll to the bottom).

If you want to see what versions you do have available, then the directory is at

ANDROID_SDK/extras/android/m2repository/com/android/support/appcompat-v7/

Otherwise, that error is strange because you should be able to have Gradle download that library if it is missing, so best guess is that the SDK libraries got updated and/or cleaned.

Conflict with dependency 'com.android.support:support-annotations' in project

You need to use the same version of support library for appCompat and support-annotations. So, change the dependencies from:

implementation 'com.android.support:appcompat-v7:26.1.0'
androidTestCompile 'com.android.support:support-annotations:27.1.1'

to

implementation 'com.android.support:appcompat-v7:27.1.1'
androidTestImplementation 'com.android.support:support-annotations:27.1.1'

Then, try to excluding existing support-annotations from espresso with:

androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})


Related Topics



Leave a reply



Submit