我有一个 2 年前的应用程序,最近更新了,现在是导航栏 系统的规模大得不成比例。该问题似乎仅适用于 Android 12 及更高版本。附上一些明暗模式下的截图
提前非常感谢您的帮助,我还有很多事情要处理。
PD:我尝试创建一个新的空白活动,但问题仍然存在,我再说一遍,这是一个应用程序范围的问题
<layout 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"
tools:ignore="ContentDescription">
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?colorPrimaryVariant">
<TextView
android:id="@+id/splash_tvCreatorName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="25dp"
android:fontFamily="@font/google_sans_regular"
android:text="Hi, everyone!"
android:textStyle="bold"
android:textColor="?colorOnPrimary"
android:textSize="@dimen/app_creator_name_size"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
最后问题是我需要在build.gradle中添加targetSdk,我没有出现复杂错误,也许我手动删除了它,我不认为ARR迁移直接删除了它。不用说,我不得不拆解整个应用程序才能找到这个小细节,我希望它接下来会对您有所帮助。
android {
compileSdk 34
//the compression of webp file during build causes problem with FileDescriptor in ContentProvider.
defaultConfig {
applicationId "com.myapplication"
minSdk 23
targetSdk 34
versionCode 18
.....