teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

1

該当のソースコードをactivity_main\.xmlからandroidManifext\.xmlに変更

2016/10/24 18:28

投稿

tomoe
tomoe

スコア12

title CHANGED
File without changes
body CHANGED
@@ -28,22 +28,30 @@
28
28
  ```
29
29
 
30
30
  ###該当のソースコード
31
- ```activity_main.xml
31
+ ```AndroidManifest.xml
32
32
  <?xml version="1.0" encoding="utf-8"?>
33
- <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
33
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
34
- xmlns:tools="http://schemas.android.com/tools"
35
- android:id="@+id/activity_main"
36
- android:layout_width="match_parent"
37
- android:layout_height="match_parent"
38
- tools:context="com.example.tomoe.opencvcamera.MainActivity">
34
+ package="com.example.tomoe.opencvcamera">
35
+ <uses-permission android:name="android.permission.CAMERA"/>
36
+ <uses-feature android:name="android.hardware.camera2" android:required="false"/>
37
+ <uses-feature android:name="android.hardware.camera2.autofocus" android:required="false"/>
38
+ <application
39
+ android:allowBackup="true"
40
+ android:icon="@mipmap/ic_launcher"
41
+ android:label="@string/app_name"
42
+ android:supportsRtl="true"
43
+ android:theme="@style/AppTheme">
44
+ <activity android:name=".MainActivity">
45
+ <intent-filter>
46
+ <action android:name="android.intent.action.MAIN" />
39
47
 
40
- <org.opencv.android.JavaCameraView
41
- android:layout_width="match_parent"
42
- android:layout_height="match_parent"
43
- android:id="@+id/java_camera_view"
48
+ <category android:name="android.intent.category.LAUNCHER" />
44
- />
49
+ </intent-filter>
45
- </RelativeLayout>
50
+ </activity>
51
+ </application>
46
52
 
53
+ </manifest>
54
+
47
55
  ```
48
56
  ```MainActivity.java
49
57
  import android.support.v7.app.AppCompatActivity;