λ΄ κ²½μ°μλ μ΄λ€ κ²½μ°μ λ§λ μλ¬μΈκ³ νλ..
μλ₯Ό λ€μ΄,
- AVD(Android Virtual Device) A μ com.devshin93.apktest λΌλ μ΄λ¦μ ν¨ν€μ§κ° μ€μΉλμ΄ μλ€.
- ν΄λΉ μ±μ build ν΄μ app-debug.apk λΌλ μ΄λ¦μ apk file μ λ§λ€μλ€.
- AVD A μ μ€μΉλ app-debug.apk κ³Ό λμΌν μ±μ AVD Bμ μ€μΉνκ³ μ νλ€.
Android Studio μμ terminal μ μ΄κ±°λ apk file κ²½λ‘μμ cmd μ°½μ μ΄μ΄ apk fileμ μ€μΉνλ€. -r μ΅μ : λμΌν μ΄λ¦μ apk file μ΄ μ‘΄μ¬ν κ²½μ° κΈ°μ‘΄μ νμΌμ μ§μ°κ³ , μλ‘μ΄ νμΌμ μ€μΉνλ€. -t μ΅μ : Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI] μ λ¬Έμ λ₯Ό ν΄κ²°νκΈ° μν μ΅μ . > adb install -r -t app-debug.apk |
- κΈ°μ‘΄ AVD B μ λμΌν μ΄λ¦μ ν¨ν€μ§(com.devshin93.apktest)κ° μ΄λ―Έ μ€μΉλμ΄ μλ€. κ·Έλ¬λ μ΄μ λ²μ μμ μ€μΉν apk file κ³Όλ μλͺ
κ°μ μ°¨μ΄κ° μλ λ― λ³΄μΈλ€.
> adb install -t -r app-debug.apk Performing Streamed Install adb: failed to install app-debug.apk: Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE: Package com.devshin93.apktest signatures do not match previously installed version; ignoring!] > adb uninstall com.devshin93.apktest Success > adb install -t -r app-debug.apk Performing Streamed Install Success |
+ λ§ 1 )
app-build.apk νμΌμ μμ± μμΉ : [νλ‘μ νΈλͺ ] > app > build > outputs > apk > debug
Android Studio μμ build νλ©΄ μμ κ²½λ‘μ μμ±λλ€.
+ λ§ 2)
app-build.apk νμΌμ κ²½λ‘μμ λ°λ‘ adb install ν κ²μ, adb.exe μ λν μμ€ν νκ²½ λ³μκ° μ‘ν μκΈ° λλ¬Έμ΄λ€.
μ‘ν μμ§ μλ€λ©΄ μμ€ν νκ²½ λ³μ adb λ±μΌλ‘ κ²μν΄ νκ²½λ³μλ₯Ό μ‘μ μ£Όλ©΄ λλ€..
λκΈ