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

質問編集履歴

1

エラーコードとMainActivity.javaのソースコード追記

2020/04/22 08:13

投稿

onakahetta
onakahetta

スコア23

title CHANGED
File without changes
body CHANGED
@@ -32,6 +32,49 @@
32
32
  12:02:48.824 [ERROR] [org.gradle.internal.buildevents.BuildResultLogger] BUILD FAILED in 24s
33
33
  ```
34
34
 
35
+ 追記:androidディレクトリでgradlew installDebug --stacktraceを実行
36
+ ```
37
+ > Task :app:compileDebugJavaWithJavac FAILED
38
+ C:\Users\user\Documents\sample_app\SourceCode\sampleApp\android\app\src\main\java\com\sample\sample\app\MainActivity.java:24: エラー: class、interfaceまたはenumがありません
39
+ .
40
+ ^
41
+ エラー1個
42
+
43
+ FAILURE: Build failed with an exception.
44
+
45
+ * What went wrong:
46
+ Execution failed for task ':app:compileDebugJavaWithJavac'.
47
+ > Compilation failed; see the compiler error output for details.
48
+ ```
49
+ 追記:MainActivity.javaのソースコード
50
+ こちらも開発入ってから一度も触っていません。
51
+ ```java
52
+ package com.sample.sample.app;
53
+
54
+ import android.os.Bundle;
55
+ import com.facebook.react.ReactActivity;
56
+ import org.devio.rn.splashscreen.SplashScreen;
57
+
58
+ public class MainActivity extends ReactActivity {
59
+
60
+ @Override
61
+ protected void onCreate(Bundle savedInstanceState) {
62
+ SplashScreen.show(this);
63
+ super.onCreate(savedInstanceState);
64
+ }
65
+
66
+ /**
67
+ * Returns the name of the main component registered from JavaScript. This is used to schedule
68
+ * rendering of the component.
69
+ */
70
+ @Override
71
+ protected String getMainComponentName() {
72
+ return "sampleApp";
73
+ }
74
+ }
75
+ .
76
+ ```
77
+
35
78
  ### 試したこと
36
79
 
37
80
  Execution failed for task ':app:compileDebugJavaWithJavac'.で落ちていると思いエラーの詳細を調べたのですが