Problems with setup

I'm following the instructions for manual setup with Windows on GitHub, but I'm encountering some problems when I try to run the main server. My console keeps showing me this error: Exception in thread "main" java.lang.NullPointerException: Cannot invoke "String.indexOf(int)" because "value" is null at java.base/java.lang.ProcessEnvironment.validateValue(ProcessEnvironment.java:83) at java.base/java.lang.ProcessEnvironment.put(ProcessEnvironment.java:96) at java.base/java.lang.ProcessEnvironment.put(ProcessEnvironment.java:68) at com.google.appengine.tools.KickStart.(KickStart.java:259) at com.google.appengine.tools.KickStart.main(KickStart.java:117). I've followed all the instructions, but I don't know why it keeps giving me this exception.

I believe its a java version issue, what's your Java version?

Run these:

java -version && javac --version

Let us know the output.

It's version 22, I already updated it thinking that was the problem

You need version 11 to run App Inventor.

Thanks, i fixed that problem but now when i try to recompile the software it crash with ant command after ant MakeAuthKey, it gives me Build Failed with this error: \appinventor-sources\appinventor\buildserver\build.xml:204: Java returned: 1.
I've also already tried buildtools doctor and it passes all the checks

Can you post the full logs?

This is the task where it fails:
[java] mar 24, 2024 5:01:18 PM com.google.appinventor.buildserver.util.Execution execute
[java] WARNING: ____Execution failure:
[java] java.io.IOException: Cannot run program "java" (in directory "C:\Users\santi\AppData\Local\Temp\1711296070945_0.5608770688351646-0\youngandroidproject..\build\tmp"): CreateProcess error=206, Nome del file o estensione troppo lunga
[java] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
[java] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
[java] at java.base/java.lang.Runtime.exec(Runtime.java:589)
[java] at com.google.appinventor.buildserver.util.Execution.execute(Execution.java:111)
[java] at com.google.appinventor.buildserver.tasks.android.RunD8.runD8(RunD8.java:208)
[java] at com.google.appinventor.buildserver.tasks.android.RunD8.runD8(RunD8.java:157)
[java] at com.google.appinventor.buildserver.tasks.android.RunD8.execute(RunD8.java:129)
[java] at com.google.appinventor.buildserver.tasks.android.RunD8.execute(RunD8.java:30)
[java] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[java] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[java] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[java] at com.google.appinventor.buildserver.Compiler.call(Compiler.java:169)
[java] at com.google.appinventor.buildserver.Compiler.call(Compiler.java:33)
[java] at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
[java] at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
[java] at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
[java] at java.base/java.lang.Thread.run(Thread.java:834)
[java] Caused by: java.io.IOException: CreateProcess error=206, Nome del file o estensione troppo lunga
[java] at java.base/java.lang.ProcessImpl.create(Native Method)
[java] at java.base/java.lang.ProcessImpl.(ProcessImpl.java:492)
[java] at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:153)
[java] at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
[java] ... 17 more
[java]
[java] [RunD8] INFO: Using pre-dexed dex-cached-450fedce4f7f8ad3761577b10a664200.dex <- C:\Users\santi\AppData\Local\Temp\jetty-util8169068031495206484.jar
[java] [RunD8] INFO: Using pre-dexed dex-cached-1bc51353c62ddc7fef531c4bbfd9e480.dex <- C:\Users\santi\AppData\Local\Temp\cardview3384294505639796104.jar
[java] [RunD8] INFO: Using pre-dexed dex-cached-25f0fdc2247663ae3fb9cb01b0c45b30.dex <- C:\Users\santi\AppData\Local\Temp\google-http-client-android2-beta14872767710078165310.jar
[java] [RunD8] INFO: Using pre-dexed dex-cached-e28829b0290b0077aed3e4f00a3296ae.dex <- C:\Users\santi\AppData\Local\Temp\google-http-client-jackson211658031575005461451.jar
[java] [RunD8] INFO: Using pre-dexed dex-cached-a8aff1eee2c33c72d22b20e89d676ce1.dex <- C:\Users\santi\AppData\Local\Temp\opencensus-contrib-http-util3288671898904097569.jar
[java] [RunD8] ERROR: d8 failed.
[java] [RunD8] Task errored in 0.427 seconds

BUILD FAILED

I'm trying to build an AppInventor app, but ant keeps giving me this error. I've already generated the authentication key and I've also checked for problems with buildtools doctor , but it passed all checks. I don't know what it could be.

You need JavaSDK 11

I have already installed it, but I don't know if the problem is caused by the fact that the first time I tried to compile it, I used Java 22. Only after that did I switch to Java 11

It's not a big task; just implement this PR into the project and recompile with Java 11.

You can try wiping the files, recloning it from GitHub, and then running the commands. Make sure you have the JAVA_HOME environmental variable set to the right JDK. I'm not sure about JavaSDK11, but the instructions I followed told me to download the open source version of Java SDK 8, so I downloaded OpenLogic's Java 8 and set that as my JAVA_HOME environmental variable.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.