안드로이드 개발 질문/답변
(글 수 45,052)
그동안 공부목적으로 2.1 버전으로 샘플을 제작하고 있었습니다.
이번에 안드로원 버스를 탐으로서 기기에 올려서 테스트해볼려 했는데
1.6으로 버전을 내리니.. 무작정 에러가 나는군요.
그냥 1.6으로 프로젝트 새로 만들고 소스 포팅해서 재컴파일해서
컴파일은 잘 되는데 실행하면 에러가 나네요.
API도 특별히 쓴것도 없는거같은데.
심지어는 새로운 프로젝트에서 TabLayout만 잡아서 실행해봐도 에러가 나네요.
아래는 main.xml 코드..
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp" />
</LinearLayout>
</TabHost>
</LinearLayout>
탭레이아웃 쓰는방법이 잘못되었나요?
그리고 정상적으로 컴파일은 되던데.. 1.6하고 2.X대하고 API가 차이를 어떻게 구분해서 코딩하시는지..
ActivityManager 의 killBackgroundProcesses(getPackageName()); 메소드는 컴파일 에러 메시지 띄워주더군요.
1.6에서는 없는 API인가봐요..
다른건 정상적으로 컴파일되면서 실행 오류만.. 어딜 손봐야 될지를 모르겠네요.
이번에 안드로원 버스를 탐으로서 기기에 올려서 테스트해볼려 했는데
1.6으로 버전을 내리니.. 무작정 에러가 나는군요.
그냥 1.6으로 프로젝트 새로 만들고 소스 포팅해서 재컴파일해서
컴파일은 잘 되는데 실행하면 에러가 나네요.
API도 특별히 쓴것도 없는거같은데.
심지어는 새로운 프로젝트에서 TabLayout만 잡아서 실행해봐도 에러가 나네요.
아래는 main.xml 코드..
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TabHost xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/tabhost"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<LinearLayout
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp">
<TabWidget
android:id="@android:id/tabs"
android:layout_width="fill_parent"
android:layout_height="wrap_content" />
<FrameLayout
android:id="@android:id/tabcontent"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:padding="5dp" />
</LinearLayout>
</TabHost>
</LinearLayout>
탭레이아웃 쓰는방법이 잘못되었나요?
그리고 정상적으로 컴파일은 되던데.. 1.6하고 2.X대하고 API가 차이를 어떻게 구분해서 코딩하시는지..
ActivityManager 의 killBackgroundProcesses(getPackageName()); 메소드는 컴파일 에러 메시지 띄워주더군요.
1.6에서는 없는 API인가봐요..
다른건 정상적으로 컴파일되면서 실행 오류만.. 어딜 손봐야 될지를 모르겠네요.