Closed xfqwdsj closed 3 years ago
Add to build.gradle
configurations.all {
exclude group: 'androidx.appcompat', module: 'appcompat'
}
Or the opposite if you want to use the original version of appcompat
configurations.all {
exclude group: 'dev.rikka.rikkax.appcompat', module: 'appcompat'
}
The night mode support from appcompat has problems for a very long time, so I have my own version. But the newer version of appcompat changes the behavior of MODE_NIGHT_UNSPECIFIED
, it will always try to update recourse config, so I have no choice but to make a modified version of appcompat. If you use the modified version, use rikka.material.app.DayNightDelegate
rather than appcompat's.
Other changes of the modified version are 1902d89f, 44b6d651, 700c1bc7, 0e3fad7d and 4b9b63b4.
OK. Thank you!
Add to
build.gradle
configurations.all { exclude group: 'androidx.appcompat', module: 'appcompat' }
Or the opposite if you want to use the original version of appcompat
configurations.all { exclude group: 'dev.rikka.rikkax.appcompat', module: 'appcompat' }
The night mode support from appcompat has problems for a very long time, so I have my own version. But the newer version of appcompat changes the behavior of
MODE_NIGHT_UNSPECIFIED
, it will always try to update recourse config, so I have no choice but to make a modified version of appcompat. If you use the modified version, userikka.material.app.DayNightDelegate
rather than appcompat's.Other changes of the modified version are 1902d89, 44b6d65, 700c1bc, 0e3fad7 and 4b9b63b.
I excluded androidx.appcompat but Android Studio did not find AndroidX. What should I do? There are some screenshots: (This happens no matter if I move the appbar or recyclerView)
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:consumeSystemWindowsInsets="start|end"
app:edgeToEdge="true"
app:fitsSystemWindowsInsets="start|end"
tools:context=".Activity">
<rikka.widget.borderview.BorderRecyclerView
android:id="@+id/recyclerView"
android:layout_width="0dp"
android:layout_height="0dp"
android:clipToPadding="false"
android:paddingTop="?attr/actionBarSize"
app:borderBottomVisibility="never"
app:borderTopDrawable="@null"
app:borderTopVisibility="whenTop"
app:fitsSystemWindowsInsets="top|bottom"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<rikka.material.widget.AppBarLayout
android:id="@+id/appbar"
style="?appBarStyle"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fitsSystemWindows="true"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="?attr/actionBarSize"
app:subtitleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Subtitle"
app:title="@string/string"
app:titleTextAppearance="@android:style/TextAppearance.Material.Widget.Toolbar.Title" />
</rikka.material.widget.AppBarLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
(Migrate to AndroidX)
dependencies {
configurations.all {
exclude group: 'androidx.appcompat', module: 'appcompat'
}
//implementation 'androidx.appcompat:appcompat:1.4.0-alpha01'
implementation 'com.google.android.material:material:1.3.0'
implementation 'androidx.core:core-ktx:1.6.0-alpha01'
implementation 'androidx.annotation:annotation:1.2.0'
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'
implementation 'androidx.preference:preference-ktx:1.1.1'
implementation 'androidx.swiperefreshlayout:swiperefreshlayout:1.2.0-alpha01'
implementation "dev.rikka.rikkax.core:core:1.3.2"
implementation "dev.rikka.rikkax.insets:insets:1.1.0"
implementation "dev.rikka.rikkax.material:material:1.6.5"
implementation "dev.rikka.rikkax.recyclerview:recyclerview-ktx:1.2.1"
implementation "dev.rikka.rikkax.widget:borderview:1.0.1"
implementation "dev.rikka.rikkax.widget:switchbar:1.0.2"
implementation "dev.rikka.rikkax.layoutinflater:layoutinflater:1.0.1"
}
If you know how to solve this problem (although it does not affect my work), I would be very grateful! (Can we communicate in Chinese?)
Try adding implementation 'dev.rikka.rikkax.appcompat:appcompat:1.2.0-rc01'
and implementation 'androidx.recyclerview:recyclerview:1.2.0'
.
Try adding
implementation 'dev.rikka.rikkax.appcompat:appcompat:1.2.0-rc01'
andimplementation 'androidx.recyclerview:recyclerview:1.2.0'
.
This doesn't work...
Or can you modify the package name of your Appcompat so that it does not conflict?
I want the compatibility for all libraries that uses appcompat, so the package name must be the same.
By the way, I don't know what exactly is your problem.
What operation will cause this?
By the way, I don't know what exactly is your problem.
What operation will cause this?
Move any view in the view containing rikka.widget.borderview.BorderRecyclerView.
I only use the designer for preview from the first day and I believe most people are like this. Maybe any view which extends RecyclerView will trigger this problem. 😋
I only use the designer for preview from the first day and I believe most people are like this. Maybe any view which extends RecyclerView will trigger this problem. 😋
But doing some simple operations like this in the designer is really fast. 👌
Can you solve the duplicate class problem in dev.rikka.rikkax.appcompat:appcompat? Thanks.
My dependencies:
Error info: