Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
"A problem occurred evaluating project ':app'. > Invalid revision:" — Gideros Forum

"A problem occurred evaluating project ':app'. > Invalid revision:"

I’m trying to export an unfinished version of my game just to see how the graphics look on an actual phone. I just want an apk file I can upload to my phone and install. I’ve done this many times with games I made in löve.

When I use the export function in Gideros Studio, in the Android section I added com.aprendacomjogs.presentsimpleenglish as 1 Package name and 01 as 2 Android Target Version and I left the box checked for 3 Build APK File. I didn’t add any other information such as checking the box for 4 Install APK to Device, 5 Key Store or 6 Key Alias.

The build failed with the error message:

FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\randall\Desktop\android_games\PresentSimpleEnglish\tmp\app\build.gradle' line: 4

* What went wrong:
A problem occurred evaluating project ':app'.
> Invalid revision:

Additional information can be seen in the 3 attached screenshots.
I tried finding infoemation about the "invalid revision" error but found nothing.
So what do I need to do to successfully export this game?
build_failed-1.PNG
601 x 692 - 65K
build_failed-2.PNG
599 x 696 - 61K
build_failed-3.PNG
587 x 249 - 14K
«1

Comments

  • olegoleg Member
    edited January 2018
    Verify that you have the installed version of android SDK that you specified when exporting
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • hgy29hgy29 Maintainer
    Also check that you set a correct version code (numerical) in gideros project settings
  • I would also suggest making your target Android Version at least 19
  • olegoleg Member
    edited January 2018

    @antix
    I read that target should be set to the same as the device on which you tested
    I put 23


    https://developer.android.com/training/basics/supporting-devices/platforms.html


    ** January 23, 2018 admob target= minimum 24
    image.png
    709 x 338 - 52K
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • Hi Oleg and hgy29.

    in the project properties in the settings tab 1 have version = 1.0, version code = 1 and buld number = 1. I think these were probably automatically generated as I don't remember entering this information.

    Regarding "Verify that you have the installed version of android SDK that you specified when exporting" I don'tknow what this means.
    1. In the Android tab when I click on File>Export Project there is a number 2-Android Target Version. Is that the "android SDK that you specified when exporting"?
    2. I'm using Android Studio 3.0.1, but I can't figure out how to find what my android SDK version is.
  • rpallenrpallen Member
    edited January 2018
    Hi Oleg and hgy29.

    Apparently that problem was that I hadn't run the configuration for Android Studio. After doing that, I was able to produce an .apk file with the export function.

    But now the problem is, the file doesn't work. I USBed the file to my phone, but when I tried to install it, I got an error that there was a problem parsing the package. What would cause that?
  • Снимок.JPG
    508 x 176 - 18K
    33.JPG
    537 x 395 - 49K
    44.JPG
    618 x 572 - 101K

    Likes: antix

    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+1 / -0 )Share on Facebook
  • I don't know why this has to be so damned difficult!!!

    Regarding line 7 Android SDK Version, I can't find this. I have a directory C:\Program Files\Android Studio, but nowhere in that directory or any of its subdirectories is there anything that says SDK.

    I finally figured out line 8 JDK Directory is C:\Program Files\Android\Android Studio\jre\jre. When I run the export, I get an .apk file (see the attached BUILD SUCCESSFUL report), but it still gives the parse error when I try ro install it.

    This is getting to be too complicated and I'm very frustrated. I'm taking some days off to see if I really want to continue with this. I really love programming with Gideros, but all this side BS is getting to me. Frankly, 75% of the frustration is because I have to use Windows if I want to use Gideros.

    An example of the Windows BS: when I was trying to find the path to the JDK and SDK directories in the Gideros Studio export function using the browse function, because those fields require a directory, not a file, the browse function doesn't show files. The Windows developers don't seem to care that I'm looking for a directory that has a specific file in it so I would want to see the files that are in the directories. In Linux, in such a situation, the files are shown. They are grayed out and unselectable, but you can see the files that are there. That makes too much sense to be included in Windows.

    And that's just one of the many small, but annoying things that add up to make many of us hate Windows. And frankly, there's a good chance that this is going to make me go back to löve, which I don't have to do in Windows. I may be back to Gideros after the smoke stops coming out of my ears, but that's going to take several days.

    Dislikes: SinisterSoft

    +1 -1 (+0 / -1 )Share on Facebook
  • olegoleg Member
    edited January 2018
    you do not have to look for anything

    run android studio
    Click the button I showed on the screen
    , and update the SDK


    fields in the gideros (optional) can be left empty
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • hgy29hgy29 Maintainer
    And about the package not being recognized by your device, it might be that you didn’t sign it, which is mandatory nowadays
  • my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
    +1 -1 (+2 / -0 )Share on Facebook
  • hgy29hgy29 Maintainer
    @rpallen, I agree that this platform specific setup is sometimes a pain, but this is a one time job so you'll eventually forget that you had to do it after a few app released.
    And if you think Android setup is complex, be warned that apple way is even more convoluted...

    Likes: oleg, SinisterSoft

    +1 -1 (+2 / -0 )Share on Facebook
  • @rpallen All you need to do regarding the sdk is install the latest AndroidStudio then leave all the optional bits in the gideros export blank.

    You also need to create a signing key and point to it in the export options - if you don't sign it (leave it blank) then you could use Google's own signing system in the google play dev portal.


    2018-01-12_09-57-44.png
    1033 x 802 - 170K
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • @rpallen If you still can't get it to work then somehow contact me or pm me your telephone no (if you're in the UK) and I'll call you and try help over the phone.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • Thanks, guys for your help - AND YOUR PATIENCE.
    First, a comment (actually 2 comments) about the package signing and then my current problem. I watched the video above and then I also watched another video () about this topic which I think does a better job of explaining the key process. It is done on a Mac, but the process is similar for Windows and the explanations why and how are better. Not a bad idea to watch both.

    The second comment is that when making passwords in this process, DO NOT use special characters. In one of my passwords I used $ and this caused the build to fail. I make a new keystore with passwords with only numbers and letters and it succeeded.

    Now the problem. After a successful build and transfer to my phone, I was able to install the app. But when I tried to run it, it did nothing except display the message "Unfortunately, MyPresentSimpleEnglish has stopped."

    I have a very small Gideros project that I use to test ideas. Right now that project only has a main.lua file and one image file. All it does is display the image. I exported this file using the same parameters in the export function and it worked on my phone. So Gideros Studio can export a game which works on my phone.

    How to I go about trying to figure out why this other project "stops"? It works fine in Gideros studio.
  • SinisterSoftSinisterSoft Maintainer
    edited January 2018
    It could be that a file in the project has upper and lower case letters (filenames should match exactly, including case) and the player system (mac or windows) may ignore this, but the exported system may not. Check that your filenames in your code match the filenames in the project exactly.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • hgy29hgy29 Maintainer
    It may be that your lua code tries to use a plugin but you didn't add it to your project structure. Prebuilt player have a few common plugins integrated but exported project has no plugins unless you add them explictly.
  • Even before I read your comments SinisterSoft and hgy29, I thought there was no easy way to troubleshoot this and I still don't. I think the only real way to do it is to start the program from start and do it step by step and occasionally do an export to see if the export works. Then, when it stops working, figure out why at that point.

    It shouldn't take too long to rebuild the project in this fashion since I already did it and have the code. I've also kept a log of the process I used to build it. Every day I've added something I saved the directory that the project is in in case I broke something as I continued. Sometimes I copied the directory several times in a day when I was going to add code I was unsure of. Unfortunately, I only kept about 3 days of past versions and deleted versions earlier than that, or I could just export all of previous versions until I find where it "broke".

    Well, I guess I better get started.
  • keszeghkeszegh Member
    edited January 2018
    @rpallen, on a sidenote you should really try to use some versioning system, it reduces the size of keeping old versions considerably as it only saves the difference, yet you can have a lot of information about what changed from version to version, which is hard to see otherwise. you do not need to keep online copies, git etc work completely offline too, once you set it up it's just a matter of a click to save your current version.
    try sourcetree if you want a visual gui for git, i find it quite easy to use.

    also if you later decide to make online backup then you can try bitbucket besides github, i prefer it as it allows you to keep your stuff closed-source and i can keep all the 100s of mb's of data (code, graphics, etc) related to my app there in one place.
  • hgy29hgy29 Maintainer
    @rpallen, there is actually à more direct way to figure out what is wrong: use android studio and its logcat pane to get a log of what happens when you launch your app. The downside is that android is very very verbose and it needs an experienced eye to spot the crash report sometimes.

    Likes: oleg, SinisterSoft

    +1 -1 (+2 / -0 )Share on Facebook
  • It it worked before on export and doesn't work now then it's unlikely to be a filename issue - more likely that a plugin that you use is missing.

    Tick the JSON and Bitop plugins and see if that works, they are quite commonly used for things like loading and processing settings - something that happens fairly early on.

    The bitop functions can be completely replaced by new bitwise operators - these are much faster than using the bitop function library. If it's these functions that you use then once you convert to the new operators then you no longer need the plugin.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • Thanks everyone.
    A few comments:
    This is my first Gideros project and I'm fairly new to programming. I did create 3 games in lua with löve that I successfully exported to Android. I say this to show my lack of experience, which leads me to keszegh's comment on versions. As I said, I only have experience making three games (the one I'm working on now in Gideros is a remake of one of the games I did in löve, I'm a bit overwhelmed with learning things. I'm learning how to make sprite sheets/tile maps, making images/graphics for the games (raster images in Gimp and vector images in Inkscape) and Gideros. Though I've thought about it and looked at some versioning systems, I'm not terribly interested in taking on another learning project at this time. I'm planning on looking into that if I ever successfully finish this current game.

    Nor am I terribly interested in trying to learn Android Studio at this time (or probably ever, beyond what I need for exporting to Android from a different framework).

    Regarding plugins, I'm not usin ang (at least that I know of). In fact I don't really know anything about using plugins. I'm using some libraries, like TextWrap, scenemanager, json, gtween and easing. Note: I have added json.lua and gtween.lua to my project, but I haven't done anything with either of them as yet. I expect I will, but I'm not sure, especially gtween.
  • totebototebo Member
    edited January 2018
    rpallen said:

    Even before I read your comments SinisterSoft and hgy29, I thought there was no easy way to troubleshoot this and I still don't. I think the only real way to do it is to start the program from start and do it step by step and occasionally do an export to see if the export works. Then, when it stops working, figure out why at that point.

    With the risk of not fully having understood the issue, I am nowadays avoiding messing with Android Studio AND Xcode, which has saved days/weeks per project because I don't have to fix issues on those platforms anymore. Gideros automatic export does the job for me.

    This is my workflow for mobile games:

    1. Build a Gideros player for Android or iOS
    2. Test the game directly on device from the first line of code. Doing this saves a lot of time to do with performance, multi touch and other device specific things.
    3. Build a new player every time I need to add a plugin and continue to test on device.

    Following this workflow means virtually no faff when you come to publish the game.

    If I missed the point of your posts @rpallen maybe someone else will read this and learn something. :)

    My Gideros games: www.totebo.com
  • @rpallen , i'm sure you could set up versioning in an hour, try it for your next project.
  • rpallenrpallen Member
    edited January 2018
    Well, it appears I've discovered WHERE the problem is, but not WHAT the problem is.

    First, let me remind everyone that the problem only occurs when I run the game on my Android phone after exporting the project from Gideros Studio on my laptop, where it works fine.

    It appears that my phone doesn't like what I'm doing with a module. I was basically troubleshooting by rebuilding the project and frequently exporting it until it "broke", i.e., I got the "program stopped" error on the phone.

    I couldn't figure out what in my module was causing the problem so I created a VERY simple module and call to it and even that doesn't work.

    The module file is dataModule.lua

    The only code in the file is:
    --create the table that this module returns
    local M = {}

    M = {"first", "second", "third"}

    return M

    Then, in main.lua there are the statements:
    question = require "dataModule"
    print(question[1],question[2],question[3])

    Again, this works fine in GiderosPlayer on my laptop, but not on my phone when I export it. If I comment out those 2 lines in main.lua, the exported program runs fine on the phone.

    One note, first I tried commenting out just the print(question[1],question[2],question[3]) line, but it still didn't work. But when both lines are commented out, it works.

    Am I doing something wrong with this module?
  • olegoleg Member
    edited January 2018
    The gideros itself connects the modules

     require "dataModule" - no need
    --The module file is dataModule.lua
     
    M = {}
     
    M = {"first", "second", "third"}
     
    return M
     
    --Then, in main.lua there are the statements:
     
    print(M[1],M[2],M[3])
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
  • Then I don't understand how it knows that "question" is the same as "M" in the module.

    I tried removing require and it printed nil for the 3 values of question.

    I then tried removing the quotes around dataModule and got: main.lua:15: attempt to index global 'question' (a nil value).

    I also tried question = M and got the same result. So how do I access the data in dataModule if I don't use require?

    I also tried using M instead of question in the print statement:
    print(M[1],M[2],M[3]) and that doesn't work either.
  • hgy29hgy29 Maintainer
    Accepted Answer
    @rpallen, you probably forgot to mark your module as 'exclude from execution' in the project. When gideros runs your projectit loads and execute all lua files unless you mark them as excluded from execution. If your lua file is a module (loaded when require is invoked) then you should exclude it from initial execution.

    This doesn't explain why it works in the player but not when exported you may ask. This is because when you export the project, gideros pre-compile all lua files and merge together all files that needs to be executed at start, so individual files are no longer present and no longer 'require'-able
    +1 -1 (+3 / -0 )Share on Facebook
  • olegoleg Member
    edited January 2018
    rpallen said:



    I also tried using M instead of question in the print statement:
    print(M[1],M[2],M[3]) and that doesn't work either.

    M make global

    local M = {}
    M = {}
    my games:
    https://play.google.com/store/apps/developer?id=razorback456
    мій блог по гідерос https://simartinfo.blogspot.com
    Слава Україні!
Sign In or Register to comment.