diff --git a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt index 90754a09c..4b277041b 100644 --- a/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/HttpReadAloudService.kt @@ -24,11 +24,12 @@ class HttpReadAloudService : BaseReadAloudService(), MediaPlayer.OnCompletionListener { private val mediaPlayer = MediaPlayer() - private val ttsFolder = cacheDir.absolutePath + File.separator + "bdTts" + private lateinit var ttsFolder: String private var playingIndex = -1 override fun onCreate() { super.onCreate() + ttsFolder = cacheDir.absolutePath + File.separator + "bdTts" mediaPlayer.setOnErrorListener(this) mediaPlayer.setOnPreparedListener(this) mediaPlayer.setOnCompletionListener(this)