紅米 7 (Redmi 7) 連接到 Android Studio (Mac)

小蛙後來使用 iPhone,之前在 Android 開發的「我的股票精算師」,因為 HTC New One 升不上去了,就越來越少維護,經過那麼長的時間,Android 也越改越多,越來越好用,越來越安全,前幾天不斷有使用者回報會閃退 ……

囉哩八唆

小蛙手邊沒有實體 Android 8+ 的裝置,雖然 Android Studio 有提供模擬器,但是模擬器不能完全跟實體機一模一樣,小蛙不管怎麼試都沒辦法試出閃退的狀況,只能先「盲改」,看錯誤訊息再把可能會出現錯誤的部份處理掉。

回家過端午,看著問題越來越多,心想這樣不是辦法,好像應該要有一台 Android 8+ 的手機來做測試,到台北之後立刻跟阿咕到三創買一隻最便宜的紅米 7 來當測試機。

題外話,前一天阿咕偷買 Google Pixel 3a 給小蛙,一知道後立馬讓阿咕把手機退掉,小蛙還沒準備要跳回 Android,即使 Google 親兒子的評價很好,但是小蛙用 Mac + iPhone 合作無間很方便!一下子跑回 Android 覺得傷感,況且小蛙買 Android 只是為了當測試機,Google Pixel 3a 這台測試機太高貴了。

買到紅米 7 之後一直到今天才有時間開箱

9VAYpF7vnKc 5utcRuvafu3lO5Z 3A77IaI1PJojBNr4xmIaPt 1f16pe8VXU C5auyTprsFSlsvTjiHTCrHdDgIBKFktiL6IsWcIliOJkktADZ7wYVlowTklgb9ZhomXR8OwSFoLe1jrR7bhbvgpZHHrhGwN0UMAAh zIskGT0fEe1o19 1X0OyvLSrU4b1 nyRvSm6h1uZarfgG8U5 SbviCNRXLCyNgA3BCPaC51O0uJrJMOcH8kyT7Q46uqqHcHUd1G9idhHfTuqUxpNn1B KMoWmIJ 4t1HIFaoq9dEQ vZqUXf1BIXQSGEfLzc5TYn1Z4ftb9Ls4XvV2L0N5NEpTR2C5uh6j7IVIHHyzro5H04kVDBfE1iAQdKyLXnlPVDdpe v8ZlF4Qze93Bxwtukprd5Eo6HhtatWaN7KbYa1nT8B26ZkWmwTUFioM1DB mBHqAjhazw43RslKolnmW 7Am5q0AoUO Rzk2VtRE2W7WX6vDnFumkeFTVy805j41xskD3xj66wJbjlpNDF eV pDRKwgMP7QZ1P OjfH7PJTaO3d4VgKvafF5l6GzULob3GHc6C4A6zqwkvLi4fIfgT5tguJbuqRh9NgUZQcgHcgH9aR2xEKWtBbagEfZcdglfxbL5PsQ2pXR8f0DMAh5a6hQcfaOEyRmvc7I39soN91cJ6S9pHVtc8GkX1q3KHlUzDjrbiCfudg0Se4T1i3Q=s1532 no 紅米 7 (Redmi 7) 連接到 Android Studio (Mac)
261loL7f82sezp2SPpvjLGqKVPzeAuUJU9mDrRaOPfSjTdHX90Dc QMOhbVIrc11K4S1HULX00qR c95C7mfFcNCTrdTV6uiAEz3gdzAjcUgUnq4bUhvNC9NUA6YHliBOK8twsUFW5PkMkBjbw9 3ODt0tIZIcdRFELYQ7h YDVLStdnpxOVWxiVDtJu0M oH8g7QaQv2VHaK53lPGmHOnOYi3jbPkeofcnFQIbV7IMgiCs5KL5E2lb0wmtBS4irycHcnQ9HRCs8700ag3HiWQy 7h7eR58b AAxE b2u7BfjBj6TyiBkfNW56OtBsiadxdiW1ALt4QUixPh9oBDrL 3cnRwmUkMiFCjh81cFnUXnKuAMefk99Sn22UuRP7NXHw ij7MLifXkFGL6daA6FlbXVQXymTKdw2oTcXLkAcoIhLSeDnu0bxAwDXcBAbaRmzZTYFAbQYOi1u8Vfi0jyD9uEoPQeuRFnpCupK3Lq7ueRytWD3aQghKynm7qQDfq3jpRB1vXTaOkq0ySC1aTUd3l 7x lyIgalUDiPFkhSEK BQOBFIgd4XwrhtYFqHW0R8cP5pYNayU5Dr8BNe4t3Rdu5Kw1F37xNWK52FMkVatm Hjg34KSrAzpGBtwER19DiIdpcd9A OQd6zhr8BCS9di39KLD52q Kn4fcoFzGZkxw3UyQxrPmfc9P nYxoMX64SHTB6qEK34fkjEWUa99WA=s1434 no 紅米 7 (Redmi 7) 連接到 Android Studio (Mac)
yKdDhpcuZFLBGZTzcWhXlbHLiZugDxZUun1Wp9qjSALrTHuDtngl6pbY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iDr3B9T n vd7a9PYG3JKz80WdrpYugtr7acVnxjDwMsByixZLpJIMv4hgrcF1oQmkYSFdAvJuQulHrEFNtk7J JSCZeM0i6ca7zas0E6m4xWVRPf ZwSr6Kf6SL zlelWya4 M5xK0zNa0hd427jfFBUTryFuIusu3nQjRpU8qNcL2jjIj CvLw9bMplvtB1TAILhiDd6Ymv2MES9DBVhaWkLhVyketNORPfsUk4P44D5ElBnpAy08e9J5Vvocb nRbV93TkxxeKHKIsO2J9QdjgbKFZK haCRVUf Tl Ik5wuPSTUPR0ZX0 lzf3YycyFhN 2jVkmD5E hsUg=s1434 no 紅米 7 (Redmi 7) 連接到 Android Studio (Mac)

目前開始使用第一天,把該更新的更新一下,整體感覺都還不錯,小蛙買的是黑色的,因為感覺其他兩種顏色塑膠感太重 …

紅米 7 連接 Android Studio

說太多廢話了,小蛙把紅米 7 連接上 Mac,在 Android Studio 裡面按下 Run,果然沒有那麼簡單

21:17 Session 'app': Install failed. Installation failed Rerun

之前開發都要先裝 driver,但是 Mac 下小蛙好像都沒有裝過 driver,就能開發其他安卓裝置,好久沒使用安卓裝置,印象中有一個東西叫做「USB 偵錯」以及「MTP」。

MTP 設定好了,但找不到 USB 偵錯,努力回想 ~ 有一個東西叫做「開發者模式」(在紅米裡面叫做開發者選項)

設定 -> 關於手機 -> MIUI 版本(連點多下就可以開啟開發者選項)
YFnh1AfyWzU5hbGLp7Bj5h3MwpcD4yXRPSF78F5UYWf4TTVjApUNXqlqvQPIPThuELF3QN3d0XNfaozvgoaOKPlxYvoakWYgHlXJSyzPUfRaHvmVpNQofxPLx9JUO7bf DkgtIwAc2IOTscTy6BOS1e9 2ELTuH473uV hn0VqyuPQNI 2CSmn85bmEVrAdlHMuWZ6APieBOjnLtEipvZqYCycjNJnmUnKRdug36SooJJOVvQI2o7BWZrHkMXsqvJF8y R1 vhe nWGYaxDW8NsncZXekkAbBQ9cuVmUVwaL6OpdVNhobIBG4Tso rbw J63mDDEinDYwgKheUq3CyDnAuh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mc2LibB6Hmq5XdjcvjNsU3rtR4HLOXz6t4aulsweh0fjXQ=w720 h1520 no 紅米 7 (Redmi 7) 連接到 Android Studio (Mac)

開啟之後,我們就來設定開發者選項

設定 -> 更多設定 -> 開發者選項 -> 開啟 USB 偵錯及 USB 安裝 
8zG1bznplS7T2d6uHR7sqnWV28UBMY1c2700igm0mpFauN1wfQjFIvewF7WT19LQ8flGZak2845aZapigSwHSAbQW9uplIuMrMuHtxlSqZJ5cnKhfo1R aLYMs06xjgzrjsbLA5BfqX6K4FTJnQXYrP2xIUOycfcCiTiqjOHbi4sxs Msd5kYLOgGDnqsSau1aTI8v5flnl4SPoEXxbtdT6K0uoomC YBHkN7Nm0JmfQWGiWkkPcJXOlZqmqWFmgpdbYitmRQPTyDxZBQHiVVWE0Y514UqY3knwA1ukjMfRzHnFo0ukojLya0P162Pr7n agJM oIaNV4bwvSoRdlciV0MAowNy5RqFmx5xSagfijPWP B2pf2WNCvTTbjzuV93Sn9Bc1a5iOMziu4s0sQuzZCBPreBuinYQ3hvtAtZVFqUO2XaaKOBzODTvVxWJ8236VJPrJ8TcdM8YckwtpGQSrUil9ne1GHQrY4A0QuEbSRhVSpcllcwYPTrfmN2vL7lIP8NQ 5Q5MxmcYNP143LtaCsHEL NlD6hdulwnik16H5H4brzLWTw5Pnh6qnFXnOE0dhnjihvmKAfmZVkrMGDUy Y2 yAc TtBFchUIH0P9hPpBOlZGugHhy79C7mE3mkjomJaLEjPbJIIqXZ9bYxxNhpZsbzKFND0 Bt1U1 btVGV2Iw29Z6GiCECYFoLKPfuZMBxg1hkOjellvxM umQ=w720 h1520 no 紅米 7 (Redmi 7) 連接到 Android Studio (Mac)
436nwDnU7dXmcX0ocpFKvnwelSkmkosRI0HLlnVN mf7I0wCKtzbn1M74YhF3MGxYsoixnuUc5pqu JAeAfrcjq2s pZFTFpx Oyt GhNIZV4EWOIHeNgHz0N8DauRF2jzbzBAN 2Dd5CWT6rOHQ0IaLhM FdhH2IqXFPJW5YPh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3BcAsvyEHCiOAlNI2PZd04TxCn2P5AIIAFC3bl5WM6SA7jj38BvdzTWXql6Colw81MiVlG2MPb2cOpeJWhCyb7RALDtFvtSCRIl26aVZa 6cuH8P5HgEXdXYnlq No7cEBNWSg5bKMrTKibSBN6c40teEN5RCqtFuzd uZDuX2RKGaUndunnBa7BgXq1JBNo2rp2sv5HLQihbRGIOkPZbE3WdPmv0djW6hy7HHmGcz1pkB Ouw=w720 h1520 no 紅米 7 (Redmi 7) 連接到 Android Studio (Mac)

開啟 USB 安裝必須要先登入小米帳號,這邊小蛙因為不想登入小米帳號,一直得到這個錯誤

Error: INSTALL_FAILED_USER_RESTRICTED: Install canceled by user

這兩個選項打開,再回到 Android Studio Run Project 就可以了喔!

JuV hEKp9U926LeEfvqaCh6eRrxNPKFBCFJziRYKGp2yrXqPi6eIdU1lXt6asSg liI36jukgIWGZONq5kwPif9rBEDcD WE8EE TFGQ0a63fnIfHD8liB3jwR i7vdMCCjYRRgIvl5WSSjexIY7cKTvUW01n78wTLqH72xO00qBN6PRtOshsU3 Slff8Xe0jEuaXdaBG7lnQxUw3B1gl3iEmn J7Bz1txUFvIA7VtIXb3s34a1CH yKJ 5yuu 9F 4R4vf4voyDSJzrVOyPd3ngGNqDU1fVlknFFtan78pmOdbGe0gBT9Azh9LICxBOD4REKbUrDf2Mr jVPATHhLRQN q 0IQjcy2gKOiaufLBCBjdkeQS73jS60tTywMyPoQ5 rd4FuSDsGFyn45NnuCASwz9pCuFz3HY SwZHDwgoxIQVCLes7zoyuz9dTADdQbEsp7apC1Cil p1yi9wJrJ3yiexEOP1RqnBfIBcgi4XI0QWwYtZIkxLdPzV1Ta6Vi7nsTNC9TcBnFMYlaYrGnGi0QTePGy ZiaiOau9wem xr BxDqeZXsb4flBpncFq VGQ8DYrBfB7JRh6XETITmIE77xAxGv9Cqa d2HfRe8JGEnD8r9ycYvB16fUrJGSk4iqwl9ElEbMMMICasPY2dAhGxQdZnw66QfPwru8 zLmbgkI6rOne4u0OgpeFecZE8OLf8JiPST0mE0M FUS ig=w720 h1520 no 紅米 7 (Redmi 7) 連接到 Android Studio (Mac)

以上,留給有需要的人!或是不久之後遺忘過程的自己!

    發佈留言

    發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

    這個網站採用 Akismet 服務減少垃圾留言。進一步了解 Akismet 如何處理網站訪客的留言資料