質問編集履歴
3
説明のついか
test
CHANGED
File without changes
|
test
CHANGED
@@ -146,6 +146,10 @@
|
|
146
146
|
|
147
147
|
|
148
148
|
|
149
|
+
別の解決策として、
|
150
|
+
|
151
|
+
このようにSurfaceTexture をつかうべきでしょうか?
|
152
|
+
|
149
153
|
```
|
150
154
|
|
151
155
|
SurfaceTexture texture = mTextureView.getSurfaceTexture();
|
2
説明をわかりやすくした
test
CHANGED
@@ -1 +1 @@
|
|
1
|
-
mTextureView = (AutoFitTextureView)
|
1
|
+
mTextureView = (AutoFitTextureView)・・・の初期化ができません。nullになります。
|
test
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
mTextureView = (AutoFitTextureView) mTextureView.findViewById(R.id.texture_view3);にエラーがでます。
|
2
|
+
|
1
3
|
##ActivityのサンプルコードをServiceように書き換えてコードを書いているのですがmTextureViewを初期化しようとしたのですが、このようなエラーが出ます。
|
2
4
|
|
3
5
|
```java
|
1
説明の詳細の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -135,3 +135,19 @@
|
|
135
135
|
|
136
136
|
|
137
137
|
```
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
##調べたところこのような問題を抱えている人が他にもいたのですが、解決していませんでいした。
|
142
|
+
|
143
|
+
[サイトリンク](https://stackoverflow.com/questions/40114221/error-in-initializing-textureview-inside-service-in-android)
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
```
|
148
|
+
|
149
|
+
SurfaceTexture texture = mTextureView.getSurfaceTexture();
|
150
|
+
|
151
|
+
```
|
152
|
+
|
153
|
+
このようにSurfaceTexture をつかうべきでしょうか?
|