Android


오류 내용


Application Installation Failed

Installation failed with message Failed to finalize session : INSTALL_FAILED_INVALID_APK: Split lib_slice_7_apk was defined multiple times. It is possible that this issue is resolved by uninstalling an existing version of the apk if it is present, an existing version of the apk if it is present, and then re-installing.


WARNING: Uninstalling will remove the application data!


Do you want to uninstall the existing application?


----------------------------------------------------------------------------------------------------------------------------------


해결 방법


1. 상단에 Build 메뉴 - Clean Project 클릭


2. 상단에 Build 메뉴 - Rebuild Project 클릭


public class MainActivity extends AppCompatActivity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,
WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
}


1. 위와 같이 MainActivity 자바 파일에 getWindow().setFlags( ... ); 을 추가하면 상태바를 없앨 수 있다.


<resources>

<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<!-- No Title Bar-->
<item name="windowActionBar">false</item>
<item name="windowNoTitle">true</item>
</style>

</resources>


2. 위와 같이 values 폴더 내에 있는 styles.xml파일에 No Title Bar 부분의 코드를 추가해주면 타이틀 바를 없앨 수 있다.

+ Recent posts