OSRSB / OsrsBot

A RuneLite bot automation extension API for Old School RuneScape
https://discord.gg/CGBXNrHREP
GNU General Public License v3.0
137 stars 72 forks source link

[QUESTION] Can't build when importing and using gradle for this project or script template #314

Open Salam-Boy opened 1 year ago

Salam-Boy commented 1 year ago

Propose your question I posted the problem in discord, I'm not sure why its giving this error when running run on osrs bot repo: ` 1:29:16 PM: Executing 'build'...

Starting Gradle Daemon... Gradle Daemon started in 1 s 284 ms

Task :compileJava /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/methods/Skills.java:85: error: method getCurrentLevel(Skill) is already defined in class Skills public int getCurrentLevel(final Skill skill) { ^ /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/botLauncher/Application.java:120: error: cannot find symbol log.error("Error while starting bot", e); ^ symbol: variable log location: class Application /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/methods/MethodProvider.java:97: error: cannot find symbol log.debug("Method sleep disrupted", ignored); ^ symbol: variable log location: class MethodProvider /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/wrappers/RSCharacter.java:48: error: cannot find symbol log.warn("Path field failed getting a value", e.getCause()); ^ symbol: variable log location: class RSCharacter /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/wrappers/RSCharacter.java:60: error: cannot find symbol log.warn("Path field failed getting a value", e.getCause()); ^ symbol: variable log location: class RSCharacter /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/wrappers/RSCharacter.java:75: error: cannot find symbol log.error("Accessed reflected object incorrectly", e.getCause()); ^ symbol: variable log location: class RSCharacter /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/wrappers/RSCharacter.java:86: error: cannot find symbol log.error("Accessed reflected object incorrectly", e.getCause()); ^ symbol: variable log location: class RSCharacter /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/wrappers/RSObject.java:159: error: cannot find symbol log.debug("Error", e); ^ symbol: variable log location: class RSObject /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/modified/RuneLite.java:239: error: log has private access in RuneLite log.error("Uncaught exception:", throwable); ^ /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/modified/RuneLite.java:242: error: log has private access in RuneLite log.error("Classes are out of date; Build with maven again."); ^ /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/modified/RuneLite.java:291: error: log has private access in RuneLite log.info("Client initialization took {}ms. Uptime: {}ms", end - start, uptime); ^ /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/modified/RuneLite.java:295: error: log has private access in RuneLite log.warn("Failure during startup", e); ^ /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/modified/RuneLite.java:503: error: log has private access in RuneLite log.warn("unable to setup insecure trust manager", ex); ^ /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/modified/RuneLite.java:517: error: log has private access in RuneLite log.debug("Setting property {}={}", key, value); ^ /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/botLauncher/BotLite.java:156: error: log has private access in RuneLite log.debug("Failed to instantiate listener", ignored); ^ /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/botLauncher/BotLite.java:330: error: cannot find symbol ScriptDefinition def = ss.getScripts().stream().filter(x -> x.name.replace(" ", "").equals(scriptName)).findFirst().get(); ^ symbol: method getScripts() location: variable ss of type ScriptSelector /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/internal/InputManager.java:380: error: cannot find symbol log.debug("Sleep exception in input manager", ignored); ^ symbol: variable log location: class InputManager /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/methods/Combat.java:508: error: cannot find symbol log.warn("Cannot use DPSCalculator with non-BotLite client"); ^ symbol: variable log location: class Combat.DPSCalculator /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/methods/Combat.java:570: error: cannot find symbol AttackStyle[] attackStyles = WeaponType.getWeaponType(currentEquippedWeaponTypeVarbit).getAttackStyles(); ^ symbol: method getAttackStyles() location: class WeaponType /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/wrappers/RSTile.java:82: error: cannot find symbol log.debug(debugMsg, exception); ^ symbol: variable log location: class RSTile /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/wrappers/RSModel.java:111: error: cannot find symbol log.debug("Model click error", ignored); ^ symbol: variable log location: class RSModel /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/wrappers/RSModel.java:135: error: cannot find symbol log.debug("Model action perform error", ignored); ^ symbol: variable log location: class RSModel /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/wrappers/RSModel.java:214: error: cannot find symbol log.debug("Model failed to get points on screen", ignored); ^ symbol: variable log location: class RSModel /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/script/Script.java:237: error: cannot find symbol log.error("Thread died", ignored); ^ symbol: method error(String,ThreadDeath) location: variable log of type Logger /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/script/Script.java:239: error: cannot find symbol log.error("Error starting script: ", ex); ^ symbol: method error(String,Throwable) location: variable log of type Logger /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/script/Script.java:278: error: cannot find symbol log.warn("Uncaught exception from script: ", ex); ^ symbol: method warn(String,Exception) location: variable log of type Logger /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/script/Script.java:303: error: cannot find symbol log.error("Throwable: ", t); ^ symbol: method error(String,Throwable) location: variable log of type Logger /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/script/Script.java:309: error: cannot find symbol log.error("Failed to start up."); ^ symbol: method error(String) location: variable log of type Logger /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/internal/MouseHandler.java:352: error: cannot find symbol log.debug("Mouse move failed to execute properly.", e); ^ symbol: variable log location: class MouseHandler /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/internal/input/VirtualMouse.java:148: error: cannot find symbol log.debug("Listener is being re-instantiated on the client", ignored); ^ symbol: variable log location: class VirtualMouse /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/wrappers/client_wrapper/BaseClientWrapper.java:799: error: method does not override or implement a method from a supertype @Override ^ /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/wrappers/client_wrapper/BaseClientWrapper.java:801: error: cannot find symbol return wrappedClient.isPlayingJingle(); ^ symbol: method isPlayingJingle() location: variable wrappedClient of type Client /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/wrappers/client_wrapper/BaseClientWrapper.java:804: error: method does not override or implement a method from a supertype @Override ^ /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/wrappers/client_wrapper/BaseClientWrapper.java:806: error: cannot find symbol return wrappedClient.getMusicCurrentTrackId(); ^ symbol: method getMusicCurrentTrackId() location: variable wrappedClient of type Client /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/wrappers/client_wrapper/RSClient.java:23: error: RSClient is not abstract and does not override abstract method setMenuScroll(int) in Client public class RSClient extends BaseClientWrapper { ^ /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/callback/ClientThread.java:87: error: cannot find symbol log.warn("Exception in invoke", e); ^ symbol: variable log location: class ClientThread /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/callback/ClientThread.java:92: error: cannot find symbol log.trace("Deferring task {}", r); ^ symbol: variable log location: class ClientThread /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/callback/ClientThread.java:112: error: cannot find symbol log.error("Exception in invoke", e); ^ symbol: variable log location: class ClientThread /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/callback/ClientThread.java:117: error: cannot find symbol log.trace("Deferring task {}", r); ^ symbol: variable log location: class ClientThread /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/util/Extractor.java:27: error: cannot find symbol log.debug("Failed to save", ignored); ^ symbol: variable log location: class Extractor /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/util/Extractor.java:53: error: cannot find symbol log.debug("Extractor run encoding issue", ignored); ^ symbol: variable log location: class Extractor /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/util/StringUtil.java:85: error: cannot find symbol log.debug("Error with drawing line", ignored); ^ symbol: variable log location: class StringUtil /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/script/randoms/LoginBot.java:91: error: cannot find symbol log.error("Login failed. Try again."); ^ symbol: method error(String) location: variable log of type Logger /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/internal/instrumentate/CanvasMousePositionAgent.java:10: error: cannot find symbol log.info("[PREMAIN] Changes to component and container calls commencing..."); ^ symbol: variable log location: class CanvasMousePositionAgent /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/internal/instrumentate/CanvasMousePositionAgent.java:16: error: cannot find symbol log.info("[AGENTMAIN] Changes to component and container calls commencing..."); ^ symbol: variable log location: class CanvasMousePositionAgent /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/internal/input/Mouse.java:85: error: cannot find symbol log.debug("X: " + e.getX() + "\nY: " + e.getY() +"\n"); ^ symbol: variable log location: class Mouse /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/internal/input/Keyboard.java:31: error: cannot find symbol log.debug("TEST"); ^ symbol: variable log location: class Keyboard /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/service/FileScriptSource.java:44: error: cannot find symbol log.debug("Failed to list files", ioEx); ^ symbol: variable log location: class FileScriptSource /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/service/FileScriptSource.java:51: error: cannot find symbol log.debug("Failed to list files", ioEx); ^ symbol: variable log location: class FileScriptSource /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/service/FileScriptSource.java:104: error: cannot find symbol log.warn("Exception occurred " + name + " is not a valid script and was ignored!", ex); ^ symbol: variable log location: class FileScriptSource /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/service/FileScriptSource.java:107: error: cannot find symbol log.warn("VerifyError exception occurred " + name + " is not a valid script and was ignored!", verEx); ^ symbol: variable log location: class FileScriptSource /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/service/ScriptClassLoader.java:18: error: ScriptClassLoader is not abstract and does not override abstract method setLookup(Lookup) in PrivateLookupableClassLoader class ScriptClassLoader extends URLClassLoader implements ReflectUtil.PrivateLookupableClassLoader{ ^ /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/plugin/AccountManager.java:201: error: log has private access in Window log.info("Failed to save accounts... Please report this."); ^ /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/rsb/plugin/AccountManager.java:201: error: PlatformLogger.info(String,Object...) in package sun.util.logging is not accessible log.info("Failed to save accounts... Please report this."); ^ (package sun.util.logging is declared in module java.base, which does not export it to the unnamed module) /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/modified/BotModule.java:76: error: cannot find symbol Properties properties = BotProperties.getProperties(); ^ symbol: method getProperties() location: class BotProperties /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/modified/RuntimeConfigLoader.java:42: error: log has private access in RuntimeConfigLoader log.error("error fetching runtime config", e); ^ /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/modified/RuntimeConfigLoader.java:56: error: log has private access in RuntimeConfigLoader log.info("Using local runtime config"); ^ /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/callback/Hooks.java:110: error: cannot find symbol log.debug("Graphics reset!"); ^ symbol: variable log location: class Hooks /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/callback/Hooks.java:205: error: cannot find symbol log.warn("error during main loop tasks", ex); ^ symbol: variable log location: class Hooks /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/callback/Hooks.java:249: error: cannot find symbol log.debug("World map was closed, reinitializing"); ^ symbol: variable log location: class Hooks /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/callback/Hooks.java:337: error: cannot find symbol log.warn("Error during overlay rendering", ex); ^ symbol: variable log location: class Hooks /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/callback/Hooks.java:437: error: cannot find symbol log.warn("Error during overlay rendering", ex); ^ symbol: variable log location: class Hooks /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/callback/Hooks.java:453: error: cannot find symbol log.warn("Error during overlay rendering", ex); ^ symbol: variable log location: class Hooks /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/callback/Hooks.java:473: error: cannot find symbol log.debug("Skipping login updateNpc"); ^ symbol: variable log location: class Hooks /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/callback/Hooks.java:502: error: cannot find symbol log.warn("Error during overlay rendering", ex); ^ symbol: variable log location: class Hooks /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/callback/Hooks.java:518: error: cannot find symbol log.warn("Error during overlay rendering", ex); ^ symbol: variable log location: class Hooks /home/tamaka/IdeaProjects/OsrsBot/src/main/java/net/runelite/client/callback/Hooks.java:569: error: cannot find symbol log.error(message, reason); ^ symbol: variable log location: class Hooks Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 67 errors

FAILURE: Build failed with an exception.

Task :compileJava FAILED Run with --scan to get full insights.

BUILD FAILED in 9s 1 actionable task: 1 executed 1:29:26 PM: Execution finished 'build'. `

GigiaJ commented 1 year ago

Check RuneLite's docs for log stuff. I'd check myself, but I'm on mobile right now. Should be in their wiki with some background. Of course you may have already fixed this.

PhobicHD commented 1 year ago

Skills.java:85: error: method getCurrentLevel(Skill) is already defined in class Skills public int getCurrentLevel(final Skill skill) {

Try pulling the latest master. There was a merge error where two of these existed but it should be fixed now