Page 1 of 1

could not build R.Java

Posted: Tue Jan 09, 2018 12:22 pm
by paulrichards999
LC 9 DP11 running on Windows 10

Created a new stack and added just the new Map Widget. Trying to save as standalone but getting error:

There was an error while saving the stanadalone application
could not build
Error: resource directory
does not exist.

any ideas?


Re: could not build R.Java

Posted: Wed Jan 10, 2018 7:21 pm
by sphere
i've no idea.
but to start:
did you install the JAVA jdk?
Did you install Android studio or just the command line utilities? either of these is needed, and then did you download the Android sdk files?
Did you point LC in the Moblie settings to your sdk installation?

also add the path of the android sdk and java jdk to your environment settings

Re: could not build R.Java

Posted: Fri Jan 12, 2018 3:01 pm
by paulrichards999
Java SDK installed and everything is generally fine ( I deploy to Android most days - so this part works)

The issue only happens when the Map Widget is added. I can deploy OK from Mac, but just not Windows

Re: could not build R.Java

Posted: Fri Jan 12, 2018 8:37 pm
by sphere
ok if it normally works fine deploying on windows to Android
then i suggest to report a possible bug:

Re: could not build R.Java

Posted: Tue Jan 16, 2018 2:46 pm
by paulrichards999
So having done a little digging around, traced the error message to revSaveAsAndroidStandalone.livecodescript.

Just after generateResourceClasses, tBuildFolder, tManifestFile, pSettings, rResourceClasses - I place a "put tBuildFolder, tManifestFile, pSettings, rResourceClasses " (line 754) in order to gauge what might be missing... having this line in place actually builds the standalone ?! So small hurdle jumped.

But when the app is pushed to my Samsung S8 with just the Map Widget on 1 card, it just crashes straightaway (When pushed from Mac or Windows) so it does look like 2 reports needed.