Skip to content
This repository was archived by the owner on Aug 23, 2024. It is now read-only.

Commit 19ec341

Browse files
committed
更新依赖库等
更新依赖库 修复 Android 12 崩溃问题
1 parent 4c4cd07 commit 19ec341

File tree

10 files changed

+54
-29
lines changed

10 files changed

+54
-29
lines changed

.idea/deploymentTargetDropDown.xml

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

UPDATE.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
TODO 插件支持
22

3+
3.12.3 2022年3月5日
4+
更新依赖库
5+
修复 Android 12 崩溃问题
6+
37
3.12.1 2021年12月24日
48
升级目标 API 31(Android 12),Gradle 7.3
59
引入 Jetpack Compose

app/build.gradle

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ android {
3636
applicationId "com.dirror.music"
3737
minSdkVersion 21
3838
targetSdkVersion 31
39-
versionCode 755
40-
versionName "3.12.2"
39+
versionCode 756
40+
versionName "3.12.3"
4141

4242
multiDexEnabled true
4343

4444
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
4545

4646
ndk {
47-
abiFilters 'armeabi-v7a', 'arm64-v8a'
47+
abiFilters 'armeabi-v7a', 'arm64-v8a' // , 'x86_64'
4848
}
4949

5050
}
@@ -71,7 +71,7 @@ dependencies {
7171
implementation fileTree(dir: "libs", include: ["*.jar"])
7272
implementation "org.jetbrains.kotlin:kotlin-stdlib:1.5.31"
7373
implementation 'androidx.core:core-ktx:1.7.0'
74-
implementation 'androidx.appcompat:appcompat:1.2.0'
74+
implementation 'androidx.appcompat:appcompat:1.4.1'
7575
implementation 'androidx.constraintlayout:constraintlayout:2.0.4'
7676
implementation 'androidx.cardview:cardview:1.0.0'
7777
implementation 'com.google.android.material:material:1.3.0'
@@ -84,7 +84,7 @@ dependencies {
8484
implementation "androidx.drawerlayout:drawerlayout:1.1.1"
8585
implementation 'com.squareup.okhttp3:okhttp:3.12.0'
8686
implementation 'com.google.code.gson:gson:2.8.6'
87-
implementation 'androidx.work:work-runtime:2.4.0'
87+
implementation 'androidx.work:work-runtime:2.7.1'
8888
implementation 'com.eightbitlab:blurview:1.6.3'
8989
implementation 'androidx.lifecycle:lifecycle-runtime-ktx:2.2.0'
9090
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.2'
@@ -94,15 +94,18 @@ dependencies {
9494
implementation 'com.squareup.okio:okio:2.10.0'
9595
implementation 'org.jsoup:jsoup:1.13.1'
9696
implementation 'com.tencent:mmkv-static:1.2.2'
97-
implementation 'com.umeng.umsdk:common:9.3.8'
98-
implementation 'com.umeng.umsdk:asms:1.2.2'
99-
implementation 'com.umeng.umsdk:crash:0.0.4'
97+
98+
// umeng
99+
implementation 'com.umeng.umsdk:common:9.4.4'
100+
implementation 'com.umeng.umsdk:asms:1.4.1'
101+
implementation 'com.umeng.umsdk:apm:1.5.2'
102+
100103
implementation 'com.airbnb.android:lottie:3.6.0'
101104
implementation 'ren.qinc.edgetranslucent:lib:0.0.3'
102105
implementation 'androidx.room:room-runtime:2.2.5'
103106
kapt 'androidx.room:room-compiler:2.2.5'
104107
implementation 'com.github.Moriafly:LyricViewX:1.2.1'
105-
implementation 'com.github.team403:DsoKotlinExtensions:1.0.2'
108+
implementation 'com.github.team403:DsoKotlinExtensions:1.0.3'
106109
implementation 'com.bitvale:switcher:1.1.1'
107110
implementation 'io.coil-kt:coil:1.4.0'
108111
implementation 'com.github.chrisbanes.photoview:library:1.2.4'
@@ -119,5 +122,5 @@ dependencies {
119122
implementation "androidx.compose.runtime:runtime-livedata:$compose_version"
120123

121124
// Media
122-
implementation("androidx.media:media:1.4.3")
125+
implementation("androidx.media:media:1.5.0")
123126
}

app/release/3.12.3(756).apk

4.74 MB
Binary file not shown.

app/release/DsoMusic3.12.1.apk

-4.16 MB
Binary file not shown.

app/release/output-metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"type": "SINGLE",
1212
"filters": [],
1313
"attributes": [],
14-
"versionCode": 754,
15-
"versionName": "3.12.1",
14+
"versionCode": 756,
15+
"versionName": "3.12.3",
1616
"outputFile": "app-release.apk"
1717
}
1818
],

app/src/main/AndroidManifest.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@
105105
<service
106106
android:name=".service.MusicService"
107107
android:exported="false"
108-
android:stopWithTask="true" />
108+
android:stopWithTask="true"
109+
android:foregroundServiceType="mediaPlayback" />
109110
</application>
110111

111112
</manifest>

app/src/main/java/com/dirror/music/ui/main/HomeFragment.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,27 +72,27 @@ class HomeFragment : BaseFragment(){
7272

7373
override fun initObserver() {
7474
with(mainViewModel) {
75-
statusBarHeight.observe(viewLifecycleOwner, {
75+
statusBarHeight.observe(viewLifecycleOwner) {
7676
// (binding.llMain.layoutParams as FrameLayout.LayoutParams).apply {
7777
// topMargin = it
7878
// }
79-
})
80-
neteaseLiveVisibility.observe(viewLifecycleOwner, {
79+
}
80+
neteaseLiveVisibility.observe(viewLifecycleOwner) {
8181
binding.clDaily.visibility = if (it) {
8282
View.VISIBLE
8383
} else {
8484
View.GONE
8585
}
86-
})
87-
sentenceVisibility.observe(viewLifecycleOwner, {
86+
}
87+
sentenceVisibility.observe(viewLifecycleOwner) {
8888
if (it) {
8989
binding.includeFoyou.root.visibility = View.VISIBLE
9090
binding.tvFoyou.visibility = View.VISIBLE
9191
} else {
9292
binding.includeFoyou.root.visibility = View.GONE
9393
binding.tvFoyou.visibility = View.GONE
9494
}
95-
})
95+
}
9696
}
9797

9898
}

app/src/main/java/com/dirror/music/ui/main/MainActivity.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ class MainActivity : BaseActivity() {
182182
}
183183

184184
override fun initObserver() {
185-
mainViewModel.statusBarHeight.observe(this, {
185+
mainViewModel.statusBarHeight.observe(this) {
186186
(binding.titleBar.layoutParams as ConstraintLayout.LayoutParams).apply {
187187
height = 56.dp() + it
188188
}
@@ -192,15 +192,15 @@ class MainActivity : BaseActivity() {
192192
// (binding.menuMain.llMenu.layoutParams as FrameLayout.LayoutParams).apply {
193193
// topMargin = it + 8.dp()
194194
// }
195-
})
196-
mainViewModel.navigationBarHeight.observe(this, {
195+
}
196+
mainViewModel.navigationBarHeight.observe(this) {
197197
binding.miniPlayer.root.updateLayoutParams<ConstraintLayout.LayoutParams> {
198198
bottomMargin = it
199199
}
200200
binding.blurViewPlay.updateLayoutParams<ConstraintLayout.LayoutParams> {
201201
height = 64.dp() + it
202202
}
203-
})
203+
}
204204
}
205205

206206
override fun onDestroy() {

app/src/main/java/com/dirror/music/ui/main/MyFragment.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,16 @@ class MyFragment : BaseFragment() {
9797

9898
@SuppressLint("SetTextI18n")
9999
override fun initObserver() {
100-
mainViewModel.userId.observe(viewLifecycleOwner, {
100+
mainViewModel.userId.observe(viewLifecycleOwner) {
101101
myFragmentViewModel.updateUserPlaylist(true)
102-
})
102+
}
103103
// 用户歌单的观察
104-
myFragmentViewModel.userPlaylistList.observe(viewLifecycleOwner, {
104+
myFragmentViewModel.userPlaylistList.observe(viewLifecycleOwner) {
105105
runOnMainThread {
106106
myPlaylistAdapter.submitList(it)
107107
}
108-
})
109-
mainViewModel.userId.observe(viewLifecycleOwner, { userId ->
108+
}
109+
mainViewModel.userId.observe(viewLifecycleOwner) { userId ->
110110
if (userId == 0L) {
111111
myFragmentUserAdapter.adapterUser = MyFragmentUserAdapter.AdapterUser(
112112
null, "立即登录", null
@@ -122,7 +122,7 @@ class MyFragment : BaseFragment() {
122122

123123
})
124124
}
125-
})
125+
}
126126
}
127127

128128
}

0 commit comments

Comments
 (0)