Android Android build error, please help!

Discussion in 'GameMaker Studio 2 Community Tech Support' started by MarkGuilams, Dec 2, 2018.

  1. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    Windows building works fine but for some odd reason android gives this error:

    [Fatal Error] :28:181: Element type "application" must be followed by either attribute specifications, ">" or "/>".

    FAILURE: Build failed with an exception.

    * What went wrong:
    Exception while parsing the supplied manifest file W:\com.company.game\src\main\AndroidManifest.xml
    > Element type "application" must be followed by either attribute specifications, ">" or "/>".

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    :com.company.game:generateDebugBuildConfig

    BUILD FAILED

    Total time: 2 mins 14.213 secs


    C:\WINDOWS\system32\cmd.exe DONE (1)

    Any help please? Thanks ahead of time.
     
  2. Amon

    Amon Member

    Joined:
    Sep 13, 2016
    Posts:
    135
    Have you selected a device to build to in the dropdown box when you select android as the target?
     
  3. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    Yes I have and it still doesntd work. I'm using an LG Stylo 4
     
  4. Amon

    Amon Member

    Joined:
    Sep 13, 2016
    Posts:
    135
    Have you set up the paths to android NDK 17c, androidSDK and java, correctly in options/android?
     
  5. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    Which versions of the SDK and NDK?
     
  6. Amon

    Amon Member

    Joined:
    Sep 13, 2016
    Posts:
    135
    You need android NDK r17c. The Android SDK needs to have minimum platform 16 and after. You also need JDK 1.8.0_191.
     
  7. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    I will try to get all of these. But I swore I had them. I'm on Windows 10 btw
     
  8. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    There are 4 things I am seeing in the Options for Android, each with a number versions beside them:
    Build Tools,
    Support Library,
    Target SDK,
    Mimimum SDK,
    and Compile SDK.

    What does all of this even mean?
     
  9. Amon

    Amon Member

    Joined:
    Sep 13, 2016
    Posts:
    135
    Forget those. You are looking in the wrong place.

    Start GMS2. Click FILE then PREFERENCES. In the list on the left expand PLATFORM SETTINGS and then within that click Android. There, once you click android, you will be able to see 3 boxes where you select the locations of AndroidSDK, NDK r17c, and JDK.

    Those all need to be properly filled in order to build for Android.
     
  10. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    They all say ''Found" next to them. What am I doing wrong?
     
  11. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    I'm getting a different error now, it says

    System.Exception: Build Failed
    at ..(YYDictionary `2, String, String, Boolean, String)
    at Igor.AndroidBuilder.Package()
     
  12. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    3,405
    I'd recommend creating a fresh empty room project and getting that to compile first.

    This will confirm that your build tools are setup correctly for a successful build and rule out any project specific issues that may be the cause of the problem.

    So, what happens if you try and compile an empty room project?
     
  13. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    Giving it a try now. Can't wait
    Hmm. You look. Familiar. I will see. Heh heh.
     
    Last edited: Dec 6, 2018 at 11:06 AM
  14. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    The same error.
     
  15. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    3,405
    I have over 3000 posts, you've probably seen my avatar around!
    OK so the issue is with your build tools / toolchain setup.

    First of all - unplug your device and reboot your computer.

    Now....

    What version of GMS2 are you using?
    What version of the NDK and JDK are you using?
    Have you installed the drivers for your device?
    Have you enabled Dev Mode on your device?
    Have you enabled USB Debugging on your device?

    If you open a command prompt and type 'adb' without the quotes, what is the output?

    Post the settings you are using from File > Preferences > Platform Settings > Android
    Post the settings you are using in Options > Android (in the resource tree)

    That's all for now.
     
  16. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    GMS ver 2.1.5.3
    Android NDK r17c win x86
    jdk 1.8.0_191
     
  17. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    3,405
    Well let's start with the 3 questions that you answered.

    Is there any reason you aren't using the latest version of GMS2?
    The Required SDK Article says that 2.1.4 and 2.1.5 only support NDK 16b.
    JDK seems fine.

    Have you read that article and tried to follow the Android Setup Guide?
     
  18. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    My computer cannot connect to the internet no matter what I do. I thought that was the latest version.

    Developer mode and USB debugging are alright.
     
  19. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    3,405
    If you can't update GMS2 then you need to use NDK16b as that is the highest version supported by 2.1.4 and 2.1.5 as stated in that article I linked.

    The latest stable version of GMS2 is 2.2.1, release info can be found in this thread.
     
  20. Pano

    Pano Member

    Joined:
    Dec 14, 2016
    Posts:
    76
    same error, from today after uploading GMS2
     
  21. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    You mean upGRADING? This is why game Maker has such a bad rep yet it costs so much.
     
  22. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    3,405
    Android works fine on the latest version.

    I've just compiled using 2.2.1 to my Samsung Galaxy S6 Edge.

    Whatever issues you are having are on your end, I would suggest making sure you are using the correct versions of everything and following the install guide I linked a few posts ago.

    I mean upgrading the latest version yeah, you are on 2.1.5 and the latest stable release is 2.2.1.
    If you don't want to upgrade to the latest version of GMS then use v16 of the NDK as that is the maximum supported by GMS2 v2.1.4 and v2.1.5 - this info is all in the articles I linked you to.

    Making sure you have the right SDK, NDK and JDK is the same no matter what engine you use.
    This isn't a GMS2 issue, it's a user error issue.
     
  23. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    Thanks for that man. I was talking to the other guy about the upgrading part I know it's in the article. I'm downloading 16b now!
     
  24. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    Okay, EDIT:
    Now game Maker says NDK is "Not Found" even though I just downloaded it.
     
  25. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    3,405
    You need to point GMS2 to the folder where you have extracted the NDK to.

    File > Preferences > Platform Settings > Android.

    Stop trying to run before you can walk, relax and follow that guide I linked you to - it's there for a reason.
    There are a lot of moving parts that need setting up with Android and it's easy to miss one and get frustrated if you are new to it.
     
  26. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    Boi. stop talking and read. I know to point it to the directory. I've done it plenty times before.
     
  27. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    I'm supposed to walk before I run lol thx tho
     
  28. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    3,405
    I'm out, good luck.
     
  29. MarkGuilams

    MarkGuilams Member

    Joined:
    Dec 2, 2018
    Posts:
    19
    :p:banana:
     
  30. mark rob

    mark rob Member

    Joined:
    Friday
    Posts:
    7
    I am also getting the same problem.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice