1. Hey! Guest! The 32nd GMC Jam will take place between Feb 22nd, 12:00 UTC (Friday noon) and Feb 25th, 12:00 UTC (Monday noon). Why not join in! Click here to find out more!
    Dismiss Notice

Android Failed android build after update

Discussion in 'GameMaker Studio 2 Community Tech Support' started by Warspite2, Oct 6, 2018.

  1. Warspite2

    Warspite2 Member

    Joined:
    Jun 23, 2016
    Posts:
    88
    I tried compiling one of my games that desperately needs an update, the build fails and this is what I get...

    Execution failed for task ':com.NewHopeGames.artilleryfire:transformClassesWithJarMergingForDebug'.
    > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/http/ConnectionClosedException.class

    I tried a clean and a new save of the game and still get same error. I also deleted all extensions and re-downloaded them. Last I created a totally blank game with just 1 object and a few sprites. Still same error so this is not a problem with my game. My compiler was working fine before this last gms2 update. Anyone have an idea of what I can do? Is it possible to uninstall and reinstall the previous gms2 version? Any help greatly appreciated.
     
  2. Pano

    Pano Member

    Joined:
    Dec 14, 2016
    Posts:
    81
    use previous runtime, not the last one
     
  3. Warspite2

    Warspite2 Member

    Joined:
    Jun 23, 2016
    Posts:
    88
    Come to find out, it was the GooglePlayServicesExtension. After updating gms2, I seen a notification on the marketplace indicating I needed to update the extension so I did. After updating I opened that extension and it showed v2.9.0. So mysteriously my older game compiled fine then I checked the services extension in that game and it showed v3.0.1. So i deleted and redownloaded the extension from marketplace and what did I get 2.9.0! Then I tried again, and it was version 2.9.0 again. So I tried my famous 'blank game' method and got same thing after clean download of the extension.

    Last I finally imported the 3.0.1 extension from my older game that compiled fine. So it looks like somehow the old 2.9.0 services extension replaced the 3.0.1 on the marketplace. No one can download 3.0.1 on marketplace because what is up there is 2.9.0 and it breaks the compiler. Make a blank game, download that extension and see 2.9.0 then watch one failed build after another. I made sure to download the extension for gms2 directly from marketplace. Anyway I sure hope this helps others because it took me hours of testing to figure out what was going on here.
     
    Last edited: Oct 7, 2018
  4. Winter Drake

    Winter Drake Member

    Joined:
    Oct 20, 2018
    Posts:
    1
    I've run into the same problem, and it looks like the google play services extension downgraded to 2.9.0 automatically. However, the only file I can get directly from the marketplace is a "yymp" file, which I can't find any way to import into GMS2. "Add Existing" extension requires you to choose a .YY file, and "import extension" requires a .GMEZ file. How did you manage to get the 3.0.1 version of the google play services??

    ------------------------------

    Edit, I think i figured it out, but the file I directly downloaded from the marketplace is also 2.9.0. I contacted the people who made the extension about the downgrade, it's very frustrating. If anyone has a copy of 3.0.1 please send it to me. I'm losing money because of my inability to update my app.
     
    Last edited: Oct 20, 2018
  5. sman

    sman Member

    Joined:
    Jun 28, 2016
    Posts:
    109
    I've the same problem with transformClassesWithJarMergingForDebug but it's not fixed with an old runtime (even the May 17 runtime). So it's not a runtime issue because my game was working fine at that time. So where does this problem come from?
    I've still the 2.9.0 version of the google play services extension and I don't want to update it. It was working fine. Is there any solution?
     
  6. Trasoside

    Trasoside Member

    Joined:
    Jun 25, 2016
    Posts:
    30
    Just wanted to update this post because I've been suffering from this error for days...
    I had the exact same error as @Warspite2 :
    Execution failed for task ':com.NewHopeGames.artilleryfire:transformClassesWithJarMergingForDebug'.
    > com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/apache/http/ConnectionClosedException.class

    the problem was, because I used the extensions:
    GooglePlayServicesExtension
    together with
    GooglePlayLicensingAsExt and PlayAPKExpansionExtension
    using GooglePlayServicesExtension alone worked fine.
    using GooglePlayLicensingAsExt and PlayAPKExpansionExtension alone worked fine.

    GooglePlayServicesExtension gradle:
    Code:
       compile 'com.google.android.gms:play-services-games:11.8.0'
       compile 'com.google.android.gms:play-services-ads:11.8.0'
       compile 'com.google.android.gms:play-services-plus:11.8.0'
       compile 'com.google.android.gms:play-services-gcm:11.8.0'
       compile 'com.google.android.gms:play-services-auth:11.8.0'
       compile 'com.google.android.ads.consent:consent-library:1.0.3'
     compile fileTree(dir: 'libs', include: ['*.jar'])
    
    GooglePlayLicensingAsExt gradle:
    Code:
     compile 'org.jbundle.util.osgi.wrapped:eek:rg.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
    PlayAPKExpansionExtension gradle:
    Code:
    compile 'org.jbundle.util.osgi.wrapped:eek:rg.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
    compile project(':library')
    now after tons of attempts, I figured out the following conclusions (anyone, feel free to correct me):
    PlayAPKExpansionExtension uses compile project(':library') which probably compiles org.apache.http.legacy.jar once.
    then, GooglePlayServicesExtension uses compile fileTree(dir: 'libs', include: ['*.jar']) to compile all .jar files, so that org.apache.http.legacy.jar is probably trying to compile again there.

    so what I did was changing GooglePlayServicesExtension gradle to:
    Code:
       compile 'com.google.android.gms:play-services-games:11.8.0'
       compile 'com.google.android.gms:play-services-ads:11.8.0'
       compile 'com.google.android.gms:play-services-plus:11.8.0'
       compile 'com.google.android.gms:play-services-gcm:11.8.0'
       compile 'com.google.android.gms:play-services-auth:11.8.0'
       compile 'com.google.android.ads.consent:consent-library:1.0.3'
    
    *yeah i removed the compile fileTree(dir: 'libs', include: ['*.jar']) thing and it worked.
    *btw, changing it to compile fileTree(dir: 'libs', include: ['*.jar'], exclude: 'org.apache.http.legacy.jar') also worked.

    that, solved the duplicate problem, and everything worked fine.

    hope it could help anyone else, I almost gave up on this.

    I used
    runtime : v2.2.0.261
    IDE : v2.2.0.343
    android build tools/support library/target sdk/minimum sdk/compile sdk :
    28.0.0/28.0.0/28/14/28
    also, after updating to v2.2.0.261, I removed all google extensions I used and re-added them (I believe it did solve some problems)
     
    Last edited: Dec 1, 2018
    chirpy, Zixtix and Justice like this.
  7. NetoX

    NetoX Member

    Joined:
    Jun 27, 2016
    Posts:
    12

    Wow! perfect, this save me many hours, thanks man!
     
  8. Warspite2

    Warspite2 Member

    Joined:
    Jun 23, 2016
    Posts:
    88
    Haha and guess what I am now re-introduced to this same problem once again. I am using ide 375 with runtime 291 and I have 3.0.5 of google play services installed too which is all the latest. What really gets me is the blank project test and it still fails which once again is proof it is certainly not my games. This is clearly an issue with GooglePlayServicesExtension and I just wish they would fix this. I thought once I seen the extension updated to 3.0.5 then I figured those problems were fixed. Once I get my compiler setup working again, I am not updating anymore on my main machine. I have far too much to risk when things break. I will throw the update on my laptop and see what breaks then at least I am not shut down.

    Edit: Deleted GooglePlayServicesExtension 3.0.5, reinstalled 3.0.1 from one of my older games and build successful. Just as I had done last time I had this issue. Could have something to do with why my leaderboards won't work because I have to keep using an older version of this dreadful extension. I did file a bug report regarding this issue last time i dont recall what came out of it.
     
    Last edited: Jan 3, 2019
    chrisx2ds likes this.
  9. Zixtix

    Zixtix Member

    Joined:
    Oct 13, 2016
    Posts:
    17
    I had the same issue and this solution worked. I am filing a bug report for this as this seems like an issue that YoYo should address.
     
  10. Josepho

    Josepho Member

    Joined:
    Nov 26, 2016
    Posts:
    17
    Im having the same error, can you please upload the 3.0.1 somewhere??
    edit: The gmstudio 1.4 is the version 3.0.1 and it works!!!
     
    Last edited: Feb 22, 2019 at 12:41 AM

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