How to change block color of own appinventor?

There was a NullPointerException; the code is trying to access a variable with the value null. You're probably missing a step somewhere. If it took only 38 seconds, then it shouldn't be pretty deep within.

So what I am missing

The error is belonging to compilation error, definitely you did some modification in program in order to achieve some changes so what modification you did to achieve something, have you done some modification related to block colour changes.

I think you did some changes which need to be done in some more reference places as well.

http://plovr.com/javadoc/org/plovr/MissingProvideException.html

For block colour changes, you can refer this file as well,

https://developers.google.com/blockly/guides/create-custom-blocks/block-colour

1 Like

i prefer you to reclone ai2

2 Likes

I got error in recloning

It take 910 mb and then it failed

Sorry for the late reply, but you can see that the variable is missing in multiple locations. This means that it's probably a key step.
Could anyone please post the line of code at line 30:org.plovr.cli.Main.main?

Please anyone post the line that @NishyanthKumar say

1 Like

no need to reclone can you please explain more what you have done till now?

I mean which commands you tried and which order?

@Faraz_Firoz please read it carefully and follow the steps given below.

Step : 1 (Check Pre-Requisites)

  1. Check Java is installed or not?
    run java -version
    output java version "1.8.0_281" or 1.8.x
  2. Check Apache Ant is installed or not?
    run ant -version
    output Apache Ant(TM) version 1.10.x or higher

Step : 2 (Install Dependencies)

  1. Navigate to appinventor-sources directory
    run cd appinventor-sources (for navigation)
  2. Update Dependencies
    run git submodule update --init

Step : 3 (Navigation to the Root folder and Compilation)

  1. Navigate to appinventor directory
    run cd appinventor (for navigation)
  2. Make AuthKey
    run ant MakeAuthKey ( Before compiling the code, an auth key is needed.)
  3. Source Code Compilation
    run ant (for compilation of source code)

Notes

  1. Each and every time when you make change in your source code you need to re compile your source code and new companion app.
3 Likes

Same step but not working

@Faraz_Firoz please share compilation error

1 Like
    Microsoft Windows [Version 10.0.18362.1256]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\Afroz Ahmad>java -version
java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)

C:\Users\Afroz Ahmad>ant -version
Apache Ant(TM) version 1.10.11 compiled on July 10 2021

C:\Users\Afroz Ahmad>

Microsoft Windows [Version 10.0.18362.1256]
(c) 2019 Microsoft Corporation. All rights reserved.

C:\Users\Afroz Ahmad>cd C:\Users\Afroz Ahmad\Desktop\appinventor-sources

C:\Users\Afroz Ahmad\Desktop\appinventor-sources>git submodule update --init

C:\Users\Afroz Ahmad\Desktop\appinventor-sources>cd appinventor

C:\Users\Afroz Ahmad\Desktop\appinventor-sources\appinventor>ant MakeAuthKey
Buildfile: C:\Users\Afroz Ahmad\Desktop\appinventor-sources\appinventor\build.xml

    MakeAuthKey:

    init:

    CheckAuthKey:

    MakeAuthKey:

    BUILD SUCCESSFUL
    Total time: 2 seconds

    C:\Users\Afroz Ahmad\Desktop\appinventor-sources\appinventor>ant
    Buildfile: C:\Users\Afroz Ahmad\Desktop\appinventor-sources\appinventor\build.xml

    all:

    init:

    MakeWarLibsDir:

    common_CommonUtils:

    init:

    CommonUtils:

    common_CommonVersion:

    init:

    CommonVersion:

    components_CommonConstants:

    init:

    CommonConstants:

    WarLibs:

    AiSharedLib:

    AiServerLib:

    components_AndroidRuntime:

    common_CommonVersion:

    init:

    CommonVersion:

    init:

    HtmlEntities:

    Barcode:

    CopyComponentLibraries:

    common_CommonUtils:

    init:

    CommonUtils:

    CommonConstants:

    AnnotationProcessors:

    AndroidRuntime.uptodate:

    AndroidRuntime:

    AiClientLib:

    AiRebindLib:

    blocklyeditor_BlocklyTranslationGenerator:

    CheckBlocklyTranslations:

    init:

    CheckBlocklyCompile:

    BlocklyCompile:

         [java] org.plovr.MissingProvideException: Missing provide for goog.events in ../lib/blockly/core/touch.js
         [java]     at org.plovr.Manifest.buildDependenciesInternal(Manifest.java:298)
         [java]     at org.plovr.Manifest.buildDependenciesInternal(Manifest.java:306)
         [java]     at org.plovr.Manifest.buildDependenciesInternal(Manifest.java:306)
         [java]     at org.plovr.Manifest.buildDependenciesInternal(Manifest.java:306)
         [java]     at org.plovr.Manifest.buildDependenciesInternal(Manifest.java:306)
         [java]     at org.plovr.Manifest.buildDependenciesInternal(Manifest.java:306)
         [java]     at org.plovr.Manifest.buildDependenciesInternal(Manifest.java:306)
         [java]     at org.plovr.Manifest.buildDependencies(Manifest.java:280)
         [java]     at org.plovr.Manifest.getInputsInCompilationOrder(Manifest.java:204)
         [java]     at org.plovr.Manifest.getCompilerArguments(Manifest.java:177)
         [java]     at org.plovr.CompileRequestHandler.compile(CompileRequestHandler.java:94)
         [java]     at org.plovr.cli.BuildCommand.runCommandWithOptions(BuildCommand.java:58)
         [java]     at org.plovr.cli.BuildCommand.runCommandWithOptions(BuildCommand.java:31)
         [java]     at org.plovr.cli.AbstractCommandRunner.runCommand(AbstractCommandRunner.java:41)
         [java]     at org.plovr.cli.Command.execute(Command.java:47)
         [java]     at org.plovr.cli.Main.mainWithExitCode(Main.java:56)
         [java]     at org.plovr.cli.Main.main(Main.java:30)
         [java] Exception in thread "main" java.lang.NullPointerException
         [java]     at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:187)
         [java]     at org.plovr.cli.BuildCommand.processResult(BuildCommand.java:79)
         [java]     at org.plovr.cli.BuildCommand.runCommandWithOptions(BuildCommand.java:63)
         [java]     at org.plovr.cli.BuildCommand.runCommandWithOptions(BuildCommand.java:31)
         [java]     at org.plovr.cli.AbstractCommandRunner.runCommand(AbstractCommandRunner.java:41)
         [java]     at org.plovr.cli.Command.execute(Command.java:47)
         [java]     at org.plovr.cli.Main.mainWithExitCode(Main.java:56)
         [java]     at org.plovr.cli.Main.main(Main.java:30)

    BUILD FAILED
    C:\Users\Afroz Ahmad\Desktop\appinventor-sources\appinventor\build.xml:16: The following error occurred while executing this line:
    C:\Users\Afroz Ahmad\Desktop\appinventor-sources\appinventor\build-common.xml:299: The following error occurred while executing this line:
    C:\Users\Afroz Ahmad\Desktop\appinventor-sources\appinventor\blocklyeditor\build.xml:120: Java returned: 1

    Total time: 1 minute 55 seconds

    C:\Users\Afroz Ahmad\Desktop\appinventor-sources\appinventor>

Do you have a copy of Google Cloud SDK for Java? Maybe that's what you're missing here.

I have these all all I also have Google cloud sdk- and python