HELP! CDK Component extension companion app won't compile

82 views
Skip to first unread message

Gareth Haylings

unread,
Jan 8, 2016, 4:28:40 AM1/8/16
to App Inventor Open Source Development
Hi

Can anyone help with the following problem.
I am working on the CDK source and I'm finding that when I compile the code it cannot build the Companion App. I know Taifun has also found this as well. I am using Windows 7 64bit and compile a fresh version of the CDK branch. 



This is the error I get:

CommonVersion:


AndroidRuntime:


Barcode:


ComponentList:


BuildServer:


CheckPlayApp:


PlayApp:
     
[java] Jan 07, 2016 6:06:03 PM com.google.appinventor.buildserver.ProjectBu
ilder build
     
[java] INFO: temporary project root: C:\Users\GarethH.GLOBAL\AppData\Local\
Temp\1452189963125_0.6111258198049001-0
     
[java] Jan 07, 2016 6:06:03 PM com.google.appinventor.buildserver.ProjectBu
ilder extractProjectFiles
     
[java] INFO: extracting C:\Users\GarethH.GLOBAL\AppData\Local\Temp\14521899
63125_0.6111258198049001-0\android.keystore from input zip
     
[java] Jan 07, 2016 6:06:03 PM com.google.appinventor.buildserver.ProjectBu
ilder extractProjectFiles
     
[java] INFO: extracting C:\Users\GarethH.GLOBAL\AppData\Local\Temp\14521899
63125_0.6111258198049001-0\assets\AI2Companion-Icon.png from input zip
     
[java] Jan 07, 2016 6:06:03 PM com.google.appinventor.buildserver.ProjectBu
ilder extractProjectFiles
     
[java] INFO: extracting C:\Users\GarethH.GLOBAL\AppData\Local\Temp\14521899
63125_0.6111258198049001-0\assets\Instructions.png from input zip
     
[java] Jan 07, 2016 6:06:03 PM com.google.appinventor.buildserver.ProjectBu
ilder extractProjectFiles
     
[java] INFO: extracting C:\Users\GarethH.GLOBAL\AppData\Local\Temp\14521899
63125_0.6111258198049001-0\assets\Title.png from input zip
     
[java] Jan 07, 2016 6:06:03 PM com.google.appinventor.buildserver.ProjectBu
ilder extractProjectFiles
     
[java] INFO: extracting C:\Users\GarethH.GLOBAL\AppData\Local\Temp\14521899
63125_0.6111258198049001-0\assets\connectwCode.png from input zip
     
[java] Jan 07, 2016 6:06:03 PM com.google.appinventor.buildserver.ProjectBu
ilder extractProjectFiles
     
[java] INFO: extracting C:\Users\GarethH.GLOBAL\AppData\Local\Temp\14521899
63125_0.6111258198049001-0\assets\connectwQR.png from input zip
     
[java] Jan 07, 2016 6:06:03 PM com.google.appinventor.buildserver.ProjectBu
ilder extractProjectFiles
     
[java] INFO: extracting C:\Users\GarethH.GLOBAL\AppData\Local\Temp\14521899
63125_0.6111258198049001-0\assets\mooning.png from input zip
     
[java] Jan 07, 2016 6:06:03 PM com.google.appinventor.buildserver.ProjectBu
ilder extractProjectFiles
     
[java] INFO: extracting C:\Users\GarethH.GLOBAL\AppData\Local\Temp\14521899
63125_0.6111258198049001-0\src\edu\mit\appinventor\aicompanion3\Screen1.bky from
 input zip
     
[java] Jan 07, 2016 6:06:03 PM com.google.appinventor.buildserver.ProjectBu
ilder extractProjectFiles
     
[java] INFO: extracting C:\Users\GarethH.GLOBAL\AppData\Local\Temp\14521899
63125_0.6111258198049001-0\src\edu\mit\appinventor\aicompanion3\Screen1.scm from
 input zip
     
[java] Jan 07, 2016 6:06:03 PM com.google.appinventor.buildserver.ProjectBu
ilder extractProjectFiles
     
[java] INFO: extracting C:\Users\GarethH.GLOBAL\AppData\Local\Temp\14521899
63125_0.6111258198049001-0\src\edu\mit\appinventor\aicompanion3\Screen1.yail fro
m input zip
     
[java] Jan 07, 2016 6:06:03 PM com.google.appinventor.buildserver.ProjectBu
ilder extractProjectFiles
     
[java] INFO: extracting C:\Users\GarethH.GLOBAL\AppData\Local\Temp\14521899
63125_0.6111258198049001-0\youngandroidproject\project.properties from input zip


     
[java] java.lang.NullPointerException
     
[java]     at com.google.common.base.Preconditions.checkNotNull(Preconditio
ns
.java:191)
     
[java]     at com.google.common.io.Resources$UrlByteSource.<init>(Resources
.java:77)
     
[java]     at com.google.common.io.Resources$UrlByteSource.<init>(Resources
.java:72)
     
[java]     at com.google.common.io.Resources.asByteSource(Resources.java:66
)
     
[java]     at com.google.common.io.Resources.asCharSource(Resources.java:11
1)
     
[java]     at com.google.common.io.Resources.toString(Resources.java:136)
     
[java]     at com.google.appinventor.buildserver.ProjectBuilder.getAllCompo
nentTypes
(ProjectBuilder.java:238)
     
[java]     at com.google.appinventor.buildserver.ProjectBuilder.build(Proje
ctBuilder
.java:166)
     
[java]     at com.google.appinventor.buildserver.Main.main(Main.java:82)


BUILD FAILED
C
:\Dropbox\AI\appinventor-sources\appinventor\build.xml:21: The following error
occurred 
while executing this line:
C
:\Dropbox\AI\appinventor-sources\appinventor\buildserver\build.xml:192: Java re
turned
: 1


Total time: 6 minutes 28 seconds
C
:\Dropbox\AI\appinventor-sources\appinventor [cdk-v0.1 +0 ~0 -4]>


The line causing the issue is point to  the following highlighted in red
<!-- =====================================================================
       PlayApp: builds ../build/buildserver/AppInventorCompanion.apk
       ===================================================================== -->
  <target name="PlayApp"
          depends="CheckPlayApp"
          unless="PlayApp.uptodate">
    <java classname="com.google.appinventor.buildserver.Main" fork="true" failonerror="true">
      <classpath>
        <fileset dir="${run.lib.dir}" includes="*.jar" />
      </classpath>
      <sysproperty key="file.encoding" value="UTF-8" />
      <arg value="--inputZipFile" />
      <arg value="${local.build.dir}/aiplayapp.zip" />
      <arg value="--userName" />
      <arg value="App Inventor" />
      <arg value="--isForCompanion" />
      <arg value="--outputDir" />
      <arg value="${public.build.dir}" />
      <arg value="--dexCacheDir" />
      <arg value="${public.build.dir}/dexCache" />
    </java>
  </target>

I can start the app engine but I just can seem to build the companion from the CDK branch.


Cheers 
Gareth

Taifun

unread,
Jan 8, 2016, 7:28:59 AM1/8/16
to App Inventor Open Source Development
I can confirm this issue and I'm also interested in this being fixed (Windows 10, 64 bit)
Taifun

Jeffrey Schiller

unread,
Jan 8, 2016, 9:05:00 AM1/8/16
to App Inventor Open Source Development
CDK components are designed to be downloaded to the Companion at runtime, not compiled into the Companion. Build a Companion based on the cdk-v0.1 branch. Then make your branch where you develop an external (CDK) component be based on the cdk-v0.1 branch. Compile and package your component and then import it into a test project. Then use the Companion you compiled on cdk-v0.1 to test your project.

Alternatively, you can build your component as a "normal" (non-CDK) component and then build a Companion that includes it in order to test its functionality and then make it a CDK component once you have it debugged.

I admit, the error you get if you attempt to build a Companion when you are working on a CDK component is less then ideal. Frankly the whole build process for CDK components needs significant work. For example you cannot build two CDK components in the same work tree. The build process for the two components interfere with each other!

-Jeff

On Fri, Jan 8, 2016 at 7:29 AM Taifun <taifu...@gmail.com> wrote:
I can confirm this issue and I'm also interested in this being fixed (Windows 10, 64 bit)
Taifun

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-so...@googlegroups.com.
To post to this group, send email to app-inventor-o...@googlegroups.com.
Visit this group at https://groups.google.com/group/app-inventor-open-source-dev.
For more options, visit https://groups.google.com/d/optout.

Gareth Haylings

unread,
Jan 8, 2016, 9:18:24 AM1/8/16
to App Inventor Open Source Development
Hi Jeff

When I compiled I did not have any CDK components included I. I downloaded the gitbranch for CDK then ran

ant clean

then

ant




On Friday, 8 January 2016 14:05:00 UTC, j...@mit.edu wrote:
CDK components are designed to be downloaded to the Companion at runtime, not compiled into the Companion. Build a Companion based on the cdk-v0.1 branch. Then make your branch where you develop an external (CDK) component be based on the cdk-v0.1 branch. Compile and package your component and then import it into a test project. Then use the Companion you compiled on cdk-v0.1 to test your project.

Alternatively, you can build your component as a "normal" (non-CDK) component and then build a Companion that includes it in order to test its functionality and then make it a CDK component once you have it debugged.

I admit, the error you get if you attempt to build a Companion when you are working on a CDK component is less then ideal. Frankly the whole build process for CDK components needs significant work. For example you cannot build two CDK components in the same work tree. The build process for the two components interfere with each other!

-Jeff

On Fri, Jan 8, 2016 at 7:29 AM Taifun <taifu...@gmail.com> wrote:
I can confirm this issue and I'm also interested in this being fixed (Windows 10, 64 bit)
Taifun

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsub...@googlegroups.com.

Jeffrey Schiller

unread,
Jan 8, 2016, 9:51:17 AM1/8/16
to App Inventor Open Source Development
Can you verify that the SHA1 hash of your cdk-v0.1 branch is fb9e4ca88c2f8222f27c125a177fa6bd5536a1d1

-Jeff

On Fri, Jan 8, 2016 at 9:18 AM Gareth Haylings <gareth....@googlemail.com> wrote:
Hi Jeff

When I compiled I did not have any CDK components included I. I downloaded the gitbranch for CDK then ran

ant clean

then

ant




On Friday, 8 January 2016 14:05:00 UTC, j...@mit.edu wrote:
CDK components are designed to be downloaded to the Companion at runtime, not compiled into the Companion. Build a Companion based on the cdk-v0.1 branch. Then make your branch where you develop an external (CDK) component be based on the cdk-v0.1 branch. Compile and package your component and then import it into a test project. Then use the Companion you compiled on cdk-v0.1 to test your project.

Alternatively, you can build your component as a "normal" (non-CDK) component and then build a Companion that includes it in order to test its functionality and then make it a CDK component once you have it debugged.

I admit, the error you get if you attempt to build a Companion when you are working on a CDK component is less then ideal. Frankly the whole build process for CDK components needs significant work. For example you cannot build two CDK components in the same work tree. The build process for the two components interfere with each other!

-Jeff

On Fri, Jan 8, 2016 at 7:29 AM Taifun <taifu...@gmail.com> wrote:
I can confirm this issue and I'm also interested in this being fixed (Windows 10, 64 bit)
Taifun

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-so...@googlegroups.com.
To post to this group, send email to app-inventor-o...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-so...@googlegroups.com.

Taifun

unread,
Jan 8, 2016, 10:12:43 AM1/8/16
to App Inventor Open Source Development
Jeff, I have the same issue and already reported that in the Developers group in November here https://groups.google.com/d/msg/app-inventor-dev/vA_qic8TE80/a29HdsjLBQAJ
Taifun

Jeffrey Schiller

unread,
Jan 8, 2016, 12:51:26 PM1/8/16
to App Inventor Open Source Development
I can build the companion without error based on cdk-v0.1 (SHA1 fb9e4ca88c2...). I'm using Linux and Java 7 (our normal build environment). I suspect the problem you are seeing is related to compiling on Windows.

-Jeff

On Fri, Jan 8, 2016 at 10:12 AM Taifun <taifu...@gmail.com> wrote:
Jeff, I have the same issue and already reported that in the Developers group in November here https://groups.google.com/d/msg/app-inventor-dev/vA_qic8TE80/a29HdsjLBQAJ
Taifun

--

Taifun

unread,
Jan 8, 2016, 12:58:04 PM1/8/16
to App Inventor Open Source Development
yes, as already said, this seems to be a Windows issue
Taifun

Gareth Haylings

unread,
Jan 8, 2016, 3:00:41 PM1/8/16
to App Inventor Open Source Development
Yes the SHA1 Hash is


commit fb9e4ca88c2f8222f27c125a177fa6bd5536a1d1
Merge: bcde7b6 0e6dec1
Author: Jeffrey I. Schiller <j...@mit.edu>
Date:   Thu Nov 12 11:40:59 2015 -0500
    Merge branch 'master' into cdk-v0.1

Look like as you both said this is a windows issue. It would be nice to find the issue as I really want to test some of my other non external component mods on the CDK branch

Gareth Haylings

unread,
Jan 8, 2016, 3:20:41 PM1/8/16
to App Inventor Open Source Development
I just went back to the previous commit below


commit 0e6dec19371d1976605bea45f2aad89c6dc5cab4

Author: Jeffrey I. Schiller <j...@mit.edu>
Date:   Sun Nov 8 16:57:27 2015 -0500
    Make blocks marked as bad persistent
    Fix a bug where a reload of a project with bad blocks would "unbad"
    those blocks. Make sure we store whether or not a block is bad in the
    blocks file.
    Also, some minor code cleanup (deleting redundant code).
    Change-Id: I0300554ec9a1c8805e48aa579c8c24f3960f08ce


The companion app compile fine of this commit so it is something that is happening on the latest commit 


Jeffrey Schiller

unread,
Jan 8, 2016, 4:41:22 PM1/8/16
to App Inventor Open Source Development
Taifun and Gareth. You may be dealing with separate issues. Taifun: What commit are you using. Is it pure cdk-v0.1 or did you add anything.

Gareth: Sounds like you merged master into cdk-v0.1. We have not done that yet, so you may be encountering a different issue. I'll look into it.

-Jeff

Taifun

unread,
Jan 8, 2016, 6:09:04 PM1/8/16
to App Inventor Open Source Development
I did the same as Gareth, on the pure cdk-v0.1 branch without adding anything after doing ant clean and then ant that error appeared on Windows 10, 64 bit
Taifun

Gareth Haylings

unread,
Jan 9, 2016, 9:52:44 AM1/9/16
to App Inventor Open Source Development
Jeff

As Taifun mention I am also just using the pure cdk-v0.1 branch without adding anything after doing ant clean and then ant.
The latest commit in the cdk-v0.1 branch is titled "Merge branch 'master' into cdk-v0.1"  which the one I think Taifun is also using.

Jeffrey Schiller

unread,
Jan 9, 2016, 1:27:26 PM1/9/16
to app-inventor-o...@googlegroups.com

Sounds like I should look at the changes that merge introduced.

-Jeff

--

Taifun

unread,
Mar 7, 2016, 10:15:47 AM3/7/16
to App Inventor Open Source Development
thank you for fixing this! 
building on Windows works fine now in the cdk branch 
Taifun

---

We have updated the Extensions Test Server (http://extension-test.appinventor.mit.edu). This update brings it up-to-date with the currently production system, including the inclusion of Firebase.

The Companion was also updated to version 2.36cdk1. The production Companion (2.36) should also work, but only for projects which only use built-in components (no extensions).

You can help us out by testing this new server both with the 2.36cdk1 Companion and the 2.36 Companion.

The extensions code speaks a slightly different protocol to the Companion. So normally you could not use an older Companion (read: the production Companion) once we upgrade our public service to support extensions. I just added some special backwards compatibility code that detects when an old Companion is in use and uses the original protocol. The purpose of this code is so people don’t have to immediately update their Companions when we put the extension code into production.

I have done preliminary testing myself, but the more testing, the better. Thanks in advance.

-Jeff

Reply all
Reply to author
Forward
0 new messages