You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
publicstaticvoidmain(String[] args) {
try(CreateParamsparams = newCreateParams())
{
params.setClientID(1212137405386064023L);
params.setFlags(CreateParams.getDefaultFlags());
// Create the Coretry(Corecore = newCore(params))
{
// Create the Activitytry(Activityactivity = newActivity())
{
activity.setDetails("Running an example");
activity.setState("and having fun");
// Setting a start time causes an "elapsed" field to appearactivity.timestamps().setStart(Instant.now());
// We are in a party with 10 out of 100 people.activity.party().size().setMaxSize(100);
activity.party().size().setCurrentSize(10);
// Make a "cool" image show upactivity.assets().setLargeImage("test");
// Setting a join secret and a party ID causes an "Ask to Join" button to appearactivity.party().setID("Party!");
activity.secrets().setJoinSecret("Join!");
// Finally, update the current activity to our activitycore.activityManager().updateActivity(activity);
}
// Run callbacks foreverwhile(true)
{
core.runCallbacks();
try
{
// Sleep a bit to save CPUThread.sleep(16);
}
catch(InterruptedExceptione)
{
e.printStackTrace();
}
}
}
}
}
Exception
Exception in thread "main" java.lang.UnsatisfiedLinkError: 'long de.jcm.discordgamesdk.CreateParams.allocate()'
at de.jcm.discordgamesdk.CreateParams.allocate(Native Method)
at de.jcm.discordgamesdk.CreateParams.<init>(CreateParams.java:83)
at org.example.Main.main(Main.java:12)
The text was updated successfully, but these errors were encountered:
I ran into the same issue, too. I was using the release version, which was last released in 2022.
To fix it, use the commit version instead of the release version on JitPack. As of today, it's commit 5cdac341e3, which you can find on JitPack. Example:
For the latest unreleased version, this native library is no longer needed and therefore got remove from the example.
I need to soon make a major release, so that other project can finally use the new version without the native library.
My code
Exception
The text was updated successfully, but these errors were encountered: