PokemonGoBot icon indicating copy to clipboard operation
PokemonGoBot copied to clipboard

what do i run main.kt with?

Open lazerplain1 opened this issue 10 years ago • 21 comments

i cant find out why i cant run main.kt

lazerplain1 avatar Jul 22 '16 06:07 lazerplain1

You have to build the project with gradlew

aleixsb avatar Jul 22 '16 06:07 aleixsb

I did already

lazerplain1 avatar Jul 22 '16 06:07 lazerplain1

once you've built the project you should have a compiled .jar found at \build\libs

Catnippi avatar Jul 22 '16 07:07 Catnippi

if you do gradlew tasks you'll see all options just do a run and will execute the project

aleixsb avatar Jul 22 '16 07:07 aleixsb

@D3C1V3R after the project completed i didnt get any fold besides . gradle thats it

lazerplain1 avatar Jul 22 '16 07:07 lazerplain1

@aleixsb i got a build fail

lazerplain1 avatar Jul 22 '16 07:07 lazerplain1

so there is your problem, check your java instalation or copy here the build error.

Have you just cloned this repo? There is a small bug right now that you can fix simply edditing Main.kt you can follow the fix in #41

aleixsb avatar Jul 22 '16 07:07 aleixsb

To run the program, do gradlew run

If you have a build fail, post the error message.

mluigi avatar Jul 22 '16 07:07 mluigi

@pr0ves unresolved reference:PTCLogin

lazerplain1 avatar Jul 22 '16 07:07 lazerplain1

PTCLogin() is a function from the PokemonGoAPI, and gradle doesn't find it. Try to run again gradlew build and see if it downloads anything, it should download the libraries needed for programs.

mluigi avatar Jul 22 '16 07:07 mluigi

Just change PTCLogin to PtcLogin everywere. PokeGOAPI renamed the class.

CosmoRing avatar Jul 22 '16 07:07 CosmoRing

another error now it cant compile java

lazerplain1 avatar Jul 22 '16 08:07 lazerplain1

Did you replace the code on Main.tk in line 175 for this: auth = PtcLogin(http).login(username, properties.getProperty("password"))

and line 26 for this: import com.pokegoapi.auth.PtcLogin

I think you only need to replace this and do gradlew build on your projects folder.

CosmoRing avatar Jul 22 '16 08:07 CosmoRing

i changed that already

lazerplain1 avatar Jul 22 '16 08:07 lazerplain1

The import line too? Try again gradlew build and post the full message error

mluigi avatar Jul 22 '16 08:07 mluigi

@pr0ves ERROR: JAVA_HOME is not set and 'java' command could be found in your PATH

lazerplain1 avatar Jul 22 '16 08:07 lazerplain1

Not code related.

Read the "manual" (the 3 lines).

jabbink avatar Jul 22 '16 08:07 jabbink

i did that but i cant run the main.kt

lazerplain1 avatar Jul 22 '16 08:07 lazerplain1

If you're not a programmer, download the .jar from the releases tab and run it directly with Java 1.7+.

If you would be a programmer, you'd know that you have to do ./gradlew build

(if you build it before ./gradlew --refresh-dependencies clean build)

jabbink avatar Jul 22 '16 08:07 jabbink

correction its .\gradlew build and its say some shit about my java

lazerplain1 avatar Jul 22 '16 09:07 lazerplain1