1. Hello Guest! It's with a heavy heart that we must announce the removal of the Legacy GMC Archive. If you wish to save anything from it, now's the time! Please see this topic for more information.
    Dismiss Notice

Android Compiling Error: UnauthorizedAccessException

Discussion in 'GameMaker Studio 2 Community Tech Support' started by Erramir, Dec 2, 2019.

  1. Erramir

    Erramir Member

    Joined:
    Dec 2, 2019
    Posts:
    9
    Greetings! i am having problems compiling my first ever game to mobile(android) , so mind me if i do silly questions, or the solution is simple. However i DO tried to solve it by googling the problem and "solution".

    First of all, yesterday i set up all the things related to compiling a game for testing (F5) on a device. In the whole process i found a little problem only that , however didnt stop me of continuing. The error was while creating the KeyStore, something related to not finding a path to some openSSL.cnf

    [​IMG]

    SO like i said, i just let that aside and continued reading the tutorials to set all up the TARGET platform for ANDROID.

    When i finally set the device (MY phone) i pressed F5 an it ran pretty well! there were minor things that i had to change in code, but that was not an errror itself, so, i ran it like 10 times NO PROBLEMS.

    SO, then i continued the tutorial and now it was time to COMPILE IT. It said (tutorial) that after compiling, some windows would open to upload the project. SO , ok i disconected the phone and clicked on compile and went doing other stuff on the pc (reading the tutorials or even chatting). But minutes passed and i said "did the window appear at any time while i was doing other stuff? maybe i was distracted"

    So i searched trying to find the compiled file, i didnt found it, so then i back to GM and clicked on compile again , but NOTHING HAPPENED, and from there iwas like 3 hours trying to make it work, by chaging the runtime version, reinstall GMS2, trying VM and YYC, APK and ABB, and NOTHING. The problem is an unnautorized exception to a Z path:

    [​IMG]

    I can still compile for desktop, NO problems.

    What drives me CRAZY is WHY i could run the game on device, and since i tried to compile, now i cant do any, nor compile , nor play it again in the phone because the same problem occures. What was triggered?

    PS, before posting this, i checked other threads, and tried what some user said, compiling an empty room it went k, i could do it, the APF file was generated, the device was not connected tho. Then i conected it and tried to complile again, nothign happens. Is that due some cache retated reason? i don even knwo how to delete cache, hwoever this is a diffrente matter.
     
  2. Erramir

    Erramir Member

    Joined:
    Dec 2, 2019
    Posts:
    9
    OH soryr, i forgot the output full text:


    Code:
    "cmd"  /c subst Z: "C:\Users\Ramiro\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE"
    
    elapsed time 00:00:00.1053780s for command "cmd" /c subst Z: "C:\Users\Ramiro\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE" started at 12/02/2019 05:27:35
    "cmd"  /c subst Y: "C:\Users\Ramiro\AppData\Local\GameMakerStudio2\GMS2TEMP"
    
    elapsed time 00:00:00.1132747s for command "cmd" /c subst Y: "C:\Users\Ramiro\AppData\Local\GameMakerStudio2\GMS2TEMP" started at 12/02/2019 05:27:35
    "cmd"  /c subst X: "C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2.2.4.374"
    
    elapsed time 00:00:00.1073476s for command "cmd" /c subst X: "C:\ProgramData\GameMakerStudio2\Cache\runtimes\runtime-2.2.4.374" started at 12/02/2019 05:27:35
    Saving project to: D:\02- Ramiro\Amway\MEME PUNCH\00 Game Micho\Michjo\Michjo.yyp
    "C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2.2.4.374/bin/Igor.exe"  -j=8 -options="C:\Users\Ramiro\AppData\Local\GameMakerStudio2\GMS2TEMP\build.bff" -v -- Android Run
    
    Loaded Macros from C:\Users\Ramiro\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE\Michjo_96F2CF52\macros.json
    Options: X:/bin\platform_setting_defaults.json
    Options: C:\Users\Ramiro\AppData\Roaming/GameMakerStudio2\amygdalawargames2018_2129795\local_settings.json
    Options: C:\Users\Ramiro\AppData\Roaming\GameMakerStudio2\Cache\GMS2CACHE\Michjo_96F2CF52\targetoptions.json
    X://bin/GMAssetCompiler.exe  /c /zpex /iv=0 /rv=0 /bv=0 /j=8  /gn="Michjo" /td="Y:/" /cd="Z:/Michjo_96F2CF52" /zpuf="C:\Users\Ramiro\AppData\Roaming/GameMakerStudio2\amygdalawargames2018_2129795" /m=android /tgt=8 /studio  /nodnd /cfg="default" /fU="Z:/Michjo_96F2CF52\functionsUsed.txt" /o="Y:/Michjo_227476ED_VM" /optionsini="Y:/Michjo_227476ED_VM\options.ini"  /cvm /baseproject="X:/BaseProject\BaseProject.yyp" "D:\02- Ramiro\Amway\MEME PUNCH\00 Game Micho\Michjo\Michjo.yyp" /preprocess="Z:/Michjo_96F2CF52"
    Reading project file....D:\02- Ramiro\Amway\MEME PUNCH\00 Game Micho\Michjo
    Reading project file....X:\BaseProject
    Reading config delta 'D:\02- Ramiro\Amway\MEME PUNCH\00 Game Micho\Michjo\options\main\inherited\options_main.inherited.yy'
    finished.
    
    
    X://bin/GMAssetCompiler.exe DONE (0)
    Release build
    Options: Z:/Michjo_96F2CF52\ExtensionOptions.json
    PlatformOptions
    Options: Z:/Michjo_96F2CF52\PlatformOptions.json
    Options: Z:/Michjo_96F2CF52\MainOptions.json
    displayname
    hostname
    runtime
    OptionsIni
    PlatformOptions
    X://bin/GMAssetCompiler.exe  /c /zpex /iv=0 /rv=0 /bv=0 /j=8  /gn="Michjo" /td="Y:/" /cd="Z:/Michjo_96F2CF52" /zpuf="C:\Users\Ramiro\AppData\Roaming/GameMakerStudio2\amygdalawargames2018_2129795" /m=android /tgt=8 /studio  /nodnd /cfg="default" /fU="Z:/Michjo_96F2CF52\functionsUsed.txt" /o="Y:/Michjo_227476ED_VM" /optionsini="Y:/Michjo_227476ED_VM\options.ini"  /cvm /baseproject="X:/BaseProject\BaseProject.yyp" "D:\02- Ramiro\Amway\MEME PUNCH\00 Game Micho\Michjo\Michjo.yyp" /arch=2 /bt=run /rt=vm
    Reading project file....D:\02- Ramiro\Amway\MEME PUNCH\00 Game Micho\Michjo
    Reading project file....X:\BaseProject
    Reading config delta 'D:\02- Ramiro\Amway\MEME PUNCH\00 Game Micho\Michjo\options\main\inherited\options_main.inherited.yy'
    finished.
    Compile Constants...finished.
    Remove DnD...finished.
    Compile Scripts...finished.
    Compile Objects...finished.
    Compile Timelines...finished.
    Compile Triggers...finished.
    Compile Rooms...finished.
    Compile Extensions...finished.
    Global scripts...finished.
    finished.
    collapsing enums.
    Final Compile...finished.
    Saving IFF file... Y:/Michjo_227476ED_VM\Michjo.zip
    Writing Chunk... GEN8
    option_game_speed=60
    Writing Chunk... OPTN
    Writing Chunk... LANG
    Writing Chunk... EXTN
    Writing Chunk... SOND
    Writing Chunk... AGRP
    Writing Chunk... SPRT
    Writing Chunk... BGND
    Writing Chunk... PATH
    Writing Chunk... SCPT
    Writing Chunk... GLOB
    Writing Chunk... SHDR
    Writing Chunk... FONT
    Writing Chunk... TMLN
    Writing Chunk... OBJT
    Writing Chunk... ROOM
    Writing Chunk... DAFL
    Writing Chunk... EMBI
    Writing Chunk... TPAGE
    Texture Group - Default
    Writing Chunk... TGIN
    Writing Chunk... CODE
    Writing Chunk... VARI
    Writing Chunk... FUNC
    Writing Chunk... STRG
    Writing Chunk... TXTR
    0 Compressing texture... writing texture texture_0.png...
    Writing Chunk... AUDO
    Writing Chunk... SCPT
    Writing Chunk... DBGI
    Writing Chunk... INST
    Writing Chunk... LOCL
    Writing Chunk... STRG
    Writing Chunk... SCPT
    Writing Chunk... DBGI
    Writing Chunk... INST
    Writing Chunk... LOCL
    Writing Chunk... STRG
    Stats : GMA : Elapsed=1137,651
    Stats : GMA : sp=24,au=10,bk=0,pt=0,sc=3,sh=1,fo=3,tl=0,ob=22,ro=3,da=3,ex=5,ma=87,fm=0x4000B2946FE82420
    
    
    X://bin/GMAssetCompiler.exe DONE (0)
    device
    
    DoSplash
    DoIcon
    AndroidEnvironment
    Manifest Permissions
    Manifest Metadata
    Check GML functions
    Licensing
    Creating APK Z:/Michjo_96F2CF52\Michjo_armeabi-v7a_v1.0.0.apk for arch ARM7
    5
    Copying D:\02- Ramiro\Amway\MEME PUNCH\00 Game Micho\Michjo\extensions\GooglePlayBillingExtension\AndroidSource\java\desktop.ini to Z:/Michjo_96F2CF52\Android\default\com.ErramirOrlans.CuriousCat\src\main\java\com\ErramirOrlans\CuriousCat\desktop.ini...
    System.UnauthorizedAccessException: Acceso denegado a la ruta de acceso 'Z:\Michjo_96F2CF52\Android\default\com.ErramirOrlans.CuriousCat\src\main\java\com\ErramirOrlans\CuriousCat\desktop.ini'.
       en System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
       en System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       en System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
       en System.IO.StreamWriter.CreateFile(String path, Boolean append, Boolean checkHost)
       en System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding, Int32 bufferSize, Boolean checkHost)
       en System.IO.StreamWriter..ctor(String path, Boolean append, Encoding encoding)
       en System.IO.File.WriteAllLines(String path, IEnumerable`1 contents)
       en . .(String , YYDictionary`2  )
       en . .(String , String  , YYDictionary`2  )
       en Igor.AndroidUtils.(YYDictionary`2 , String  )
       en Igor.AndroidUtils.(YYDictionary`2 , String  , Boolean  , String )
       en Igor.AndroidBuilder.Deploy(Boolean _exe)
       en Igor.AndroidBuilder.Run()
    Igor complete.
    elapsed time 00:00:03.9838570s for command "C:\ProgramData/GameMakerStudio2/Cache/runtimes\runtime-2.2.4.374/bin/Igor.exe" -j=8 -options="C:\Users\Ramiro\AppData\Local\GameMakerStudio2\GMS2TEMP\build.bff" -v -- Android Run started at 12/02/2019 05:27:35
    "cmd"  /c subst Z: /d
    
    elapsed time 00:00:00.1054117s for command "cmd" /c subst Z: /d started at 12/02/2019 05:27:39
    "cmd"  /c subst Y: /d
    
    elapsed time 00:00:00.1030088s for command "cmd" /c subst Y: /d started at 12/02/2019 05:27:39
    "cmd"  /c subst X: /d
    
    elapsed time 00:00:00.1067291s for command "cmd" /c subst X: /d started at 12/02/2019 05:27:39
    FAILED: Run Program Complete
     
  3. Erramir

    Erramir Member

    Joined:
    Dec 2, 2019
    Posts:
    9
    THe output for the EMPTY ROOM test shows someting about deprecated gradle.

    [​IMG]

    tried to put it on the original post but it says it was spam, sorry
     
  4. Nocturne

    Nocturne Friendly Tyrant Forum Staff Admin

    Joined:
    Apr 13, 2016
    Posts:
    7,045
    Okay, first, what are your Android build settings? In the Android Game Options... Take a screenshot that shows the max, min and target SDK. Also, is Android Studio up to date and have you installed it correctly? FInally, what are the paths in your Android Preferences for the SDK, NDK and Java JDK? Screenshot those and post them too please. :)
     
  5. Erramir

    Erramir Member

    Joined:
    Dec 2, 2019
    Posts:
    9
    Hi! well here there are. FIrst of all, with the same setting, i was able to compile an empty room "game". And before doing my attempt to compile my game, i was able to play it on a device connected via USB. Now i cant.

    [​IMG]

    [​IMG]

    I was able to do the empty room,and everything! (setting up all) by following your tutorials! thanks
     
    Last edited: Dec 3, 2019
  6. Erramir

    Erramir Member

    Joined:
    Dec 2, 2019
    Posts:
    9
    This is some fast update:

    I deleted GOOGLE PLAY SERVICES add ONS, and the google play BILLING extension, and now i can RUN, and COMPILE the game.

    Actually i spent all night setting the things up in the google play console, to test if the game, with that things removed, can be played.

    I dont know what implies having or not google play services, i will make a post about it.
     
    Nocturne likes this.
  7. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,772
    Were you using the latest version of the extension?
    There were changes in the recent update of GMS2 which means the old extensions will no longer work.
     
  8. Erramir

    Erramir Member

    Joined:
    Dec 2, 2019
    Posts:
    9
    i downloaded it from the addons market place itself.

    i am confusing tho (first time i EVER do this, and 3 month ago i started with programmign at ALL with GM). Google play services appears as ADDON on market place, but also it is the one that gives those 5 extensions? (billing for example) i mean, we are talking the same when saying google play services and extensions, while i understand that extension are not obligatory.
     
  9. rIKmAN

    rIKmAN Member

    Joined:
    Sep 6, 2016
    Posts:
    4,772

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