Activity를 추가하고 사용하려면 "AndroidManifest.xml"파일에 이를 선언해야한다. 이를 선언하지 않으면 have you declared this activity in your AndroidManifest.xml? 와 같은 오류가 발생하게 된다.
새로운 Activity가 SubActivity라고 하면 19번째 줄과 같은 코드를 추가하면 해결된다.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?xml version="1.0" encoding="utf-8"?>
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<activity android:name=".MainActivity">
<intent-filter>
</intent-filter>
</activity>
<activity android:name=".SubActivity" />
</application>
</manifest>
http://colorscripter.com/info#e" target="_blank" style="color:#e5e5e5text-decoration:none">Colored by Color Scripter
|
http://colorscripter.com/info#e" target="_blank" style="text-decoration:none;color:white">cs |
'끄적끄적' 카테고리의 다른 글
public, private, protected 차이점 (0) | 2021.04.10 |
---|---|
[Git] 원격 저장소 branch 가져오기 (0) | 2020.08.24 |
[Git] git 간단 사용법 (0) | 2020.08.24 |
[Tomcat] "AJP/1.3"가 뜨지 않을 때 (0) | 2020.04.29 |
[VMware] This host supports Intel VT-x, but Intel VT-x is disabled. (0) | 2020.04.02 |