I have a question about Android studio.

I'm creating my own android app, but when I start the app, it says that it's stopped repeatedly, and it doesn't work. I checked Logcat, but it's displayed as follows. ,It is not well understood. How can I fix it?

2020-07-10 22:39:52.674 17730-17730/? E/AndroidRuntime: FATAL EXCEPTION: main Process: com.example.fumemo, PID: 17730 java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.fumemo/com.example.fumemo.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3194) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95) at android.app.ActivityThreadH.handleMessage(ActivityThread.java:2016) at android.os.Handler.dispatchMessage(Handler.java:107) at android.os.Looper.loop(Looper.java:214) at android.app.ActivityThread.main(ActivityThread.java:7356) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInitMethodAndArgsCaller.run(RuntimeInit.java:492) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.pm.ApplicationInfo android.content.Context.getApplicationInfo()' on a null object reference at android.content.ContextWrapper.getApplicationInfo(ContextWrapper.java:163) at android.view.ContextThemeWrapper.getTheme(ContextThemeWrapper.java:174) at android.content.Context.obtainStyledAttributes(Context.java:738) at androidx.appcompat.app.AppCompatDelegateImpl.createSubDecor(AppCompatDelegateImpl.java:692) at androidx.appcompat.app.AppCompatDelegateImpl.ensureSubDecor(AppCompatDelegateImpl.java:659) at androidx.appcompat.app.AppCompatDelegateImpl.findViewById(AppCompatDelegateImpl.java:479) at androidx.appcompat.app.AppCompatActivity.findViewById(AppCompatActivity.java:214) at com.example.fumemo.MainActivity.(MainActivity.java:35) at java.lang.Class.newInstance(Native Method) at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95) at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:41) at android.app.Instrumentation.newActivity(Instrumentation.java:1250) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3182) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3409)  at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:83)  at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)  at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)  at android.app.ActivityThreadH.handleMessage(ActivityThread.java:2016)  at android.os.Handler.dispatchMessage(Handler.java:107)  at android.os.Looper.loop(Looper.java:214)  at android.app.ActivityThread.main(ActivityThread.java:7356)  at java.lang.reflect.Method.invoke(Native Method)  at com.android.internal.os.RuntimeInitMethodAndArgsCaller.run(RuntimeInit.java:492)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)

Recommended Posts

I have a question about Android studio.
I have a question about keyboard input of numbers
A note about adding Junit 4 to Android Studio
I got a cannot resolve symbol in Android Studio
I have a question. I get an error when playing a video in Listview on android.
I have a question because the gradle setup doesn't work
[Android] I made a pedometer app.
I tried to create a simple map app in Android Studio
I made a calculator app on Android
I made a rock-paper-scissors app with android
[Swift] [Beginner] I searched a lot about #selector
I tried using a database connection in Android development
[Android Studio] I want to use Maven library on Android
I made a library for displaying tutorials on Android.
I learned about the existence of a gemspec file
Q & A about JDK
Notes in Android studio
Defeating Android Studio Part 3-6
Defeating Android Studio Part 1 & Part 2
About Android App Components
How to take a screenshot with the Android Studio emulator
Use a JDK from another OpenJDK provider in Android Studio
I'm glad to have a method to blink characters on Android
I got an ActionController :: MissingExactTemplate even though I have a file