Process: com.example.jdabot, PID: 18944
java.lang.ExceptionInInitializerError
at net.dv8tion.jda.internal.utils.Checks.notNull(Checks.java:68)
at net.dv8tion.jda.api.requests.GatewayIntent.getRaw(GatewayIntent.java:255)
at net.dv8tion.jda.api.requests.GatewayIntent.(GatewayIntent.java:169)
at net.dv8tion.jda.api.JDABuilder.(JDABuilder.java:58)
at net.dv8tion.jda.api.JDABuilder.createLight(JDABuilder.java:241)
at com.example.jdabot.MainActivity.(MainActivity.java:21)
at java.lang.Class.newInstance(Native Method)
at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
at android.app.Instrumentation.newActivity(Instrumentation.java:1251)
here is my code
JDA jda;
{
try {
jda = JDABuilder.createLight(token).build();
} catch (LoginException e) {
e.printStackTrace();
}
}
Process: com.example.jdabot, PID: 18944
java.lang.ExceptionInInitializerError
at net.dv8tion.jda.internal.utils.Checks.notNull(Checks.java:68)
at net.dv8tion.jda.api.requests.GatewayIntent.getRaw(GatewayIntent.java:255)
at net.dv8tion.jda.api.requests.GatewayIntent.(GatewayIntent.java:169)
at net.dv8tion.jda.api.JDABuilder.(JDABuilder.java:58)
at net.dv8tion.jda.api.JDABuilder.createLight(JDABuilder.java:241)
at com.example.jdabot.MainActivity.(MainActivity.java:21)
at java.lang.Class.newInstance(Native Method)
at android.app.AppComponentFactory.instantiateActivity(AppComponentFactory.java:95)
at androidx.core.app.CoreComponentFactory.instantiateActivity(CoreComponentFactory.java:45)
at android.app.Instrumentation.newActivity(Instrumentation.java:1251)
here is my code
JDA jda;