我以為是權限問題,結果是 Google Play 的控管型發布讓我不能下架 App

記錄在 Google Play 取消發布 App 時,因未關閉「控管型發布」導致「未發布」選項無法選取的問題。說明官方限制條件,並整理關閉控管型發布後即可順利解除發布的完整操作流程,作為備忘錄。

Published on January 6, 2026 · 1 分鐘 · 51 字 · Daniel Huang

SonarQube Community Build 新手指南:從安裝到整合 Android 專案的完整教學

SonarQube Community Build 是免費的原始碼品質與資安檢測工具。本篇文章從環境需求、安裝步驟到以 Gradle 建置的 Android 專案整合,完整示範如何在本機快速導入 SonarQube 並開始進行程式碼分析。

Published on December 3, 2025 · 2 分鐘 · 393 字 · Daniel Huang

Android Studio 編譯失敗 - Error loading build artifacts

前幾天在公司專案遇到一個奇怪的 Bug,這裡筆記一下解決過程。 問題描述 在 Android Studio 點選 Run 'app' 時,專案完全沒編譯就直接報錯,錯誤訊息如下: 1 Error loading build artifacts from: D:\Daniel\Projects\cropssurvey-mk2-android\app\build\intermediates\apk_ide_redirect_file\debug\createDebugApkListingFileRedirect\redirect.txt 環境資訊 我的 Android Studio 設定參數如下: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 Android Studio Meerkat Feature Drop | 2024.3.2 Patch 1 Build #AI-243.26053.27.2432.13536105, built on May 22, 2025 Runtime version: 21.0.6+-13368085-b895.109 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Toolkit: sun.awt.windows.WToolkit Windows 11.0 GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation Memory: 4096M Cores: 16 Registry: debugger.new.tool.window.layout=true ide.experimental.ui=true Non-Bundled Plugins: one.util.ideaplugin.screenshoter (1.8.1) com.wzc.sw.plugin (1.3.3) Dart (243.26753.1) com.duke.screenmatch (3.2) idea.plugin.protoeditor (243.22562.13) com.developerphil.adbidea (1.6.19) com.godwin.kdocer (1.6) org.sonarlint.idea (10.27.0.81781) io.flutter (86.0.1) 嘗試過的解法(失敗) Sync Project with Gradle Files Rebuild Project Invalid Cache and Restart 重開 Android Studio 刪除 /.gradle 與 /.idea 兩個資料夾。參考來源 結果,以上方法,都 沒 有 用 … ...

Published on September 12, 2025 · 1 分鐘 · 193 字 · Daniel Huang

TypedArray.use{} 在 Android 11 以下出錯? Crash 原因與正確寫法一次看懂

在 Android 開發中,我們常使用 Kotlin 的 use {} 語法來自動管理資源,例如關閉檔案、關閉資料庫 Cursor。但這個便利的語法在 Android 11 以下,對某些類別其實會出錯造成應用程式閃退。如果一時不查,小心這坑就這樣踩了下去… 錯誤說明 1 2 3 4 5 context .obtainStyledAttributes(attrs, R.styleable.ActionFooterView, 0, 0) .use { // ... } 這段程式碼在 Android 12(API 31)以上沒問題,但在 Android 11 (API 30) 以下執行時,會拋出以下錯誤: 1 2 java.lang.IncompatibleClassChangeError Class 'android.content.res.TypedArray' does not implement interface 'java.lang.AutoCloseable' in call to 'void java.lang.AutoCloseable.close()' 白話來說,上面這個錯誤告訴我們,TypedArray 並沒有實作 AutoCloseable 介面,所以在試圖呼叫 AutoCloseable.close() 時拋出 IncompatibleClassChangeError 錯誤。 問題釐清:use {} 的背後原理 Kotlin use {} 是一個 extension function,會在 Block 結束後自動呼叫 AutoCloseable.close() 方法來釋放資源。 ...

Published on June 12, 2025 · 1 分鐘 · 211 字 · Daniel Huang

Android 開發|用 easylauncher 為每個版本自動加上專屬 App Icon

在 Android 專案中常見多個 build variant?用 easylauncher-gradle-plugin 為不同版本自動加上辨識用 App Icon Ribbon,讓 debug、beta、release 一目了然,提升開發與測試效率!

Published on May 15, 2025 · 2 分鐘 · 227 字 · Daniel Huang