h0102
h0102

Reputation: 256

dependency "androidx.core:core-ui" not found

When adding constraint layout group to my project, Android studio auto add the dependency in gradle:

implementation 'androidx.core:core-ui:+'

But I've got this error message:

Failed to resolve: androidx.core:core-ui:+

I couldn't find any way to add corresponding androidx dependency, the only solution I know so far is using support lib but It against the guideline to move everything to androidx.

com.android.support:support-core-ui:28.0.0

Is there any androix dependency which includes the ConstraintLayout Group?

Upvotes: 4

Views: 3986

Answers (2)

Todd Dugan
Todd Dugan

Reputation: 31

Use this in your app gradle file instead...

implementation 'androidx.legacy:legacy-support-core-ui:1.0.0-alpha1'

Upvotes: 3

Tad
Tad

Reputation: 947

Try adding this to your build.gradle file implementation 'androidx.constraintlayout:constraintlayout:1.1.0' constraint layout does not show up for me to drag it into the layout editor(3.2 canary) but I can use it by writing the code in xml and adding this library. For any other dependencies, try writing the specific dependency in gradle, it appears core-ui for androidx not working yet.

Edit:

There should be a download icon next to the dependencies you don't have. You can click on it and there will be a pop up stating the dependency name. In Studio 3.2 Canary on windows, it is not adding these dependencies automatically, which is why my solution is to implement the dependency in build.gradle manually.

Upvotes: 0

Related Questions