Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice
  2. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  3. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

gradle build

Discussion in '5.5 Beta' started by creat327, Nov 24, 2016.

  1. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Hi

    anyone tried to build using gradle on android with 5.5? I'm getting this error that I have no clue how to solve because none of my libraries have the same name than my project.

    here is the error:

    Execution failed for task ':processReleaseResources'.
    > Error: A library uses the same package as this project: com.echoboom.dogfightelite
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    ]
    stdout[
    Observed package id 'system-images;android-14;default;armeabi-v7a' in inconsistent location 'E:\android-sdk\system-images\android-14\armeabi-v7a' (Expected 'E:\android-sdk\system-images\android-14\default\armeabi-v7a')
    Incremental java compilation is an incubating feature.
    :preBuild UP-TO-DATE
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
  3. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    Nothing worked and the issue is not that. Nothing has the same name. And I don't know how to modify the command so that it prints the stack trace or some more info
     
  4. larku

    larku

    Joined:
    Mar 14, 2013
    Posts:
    1,422
    I use the Android Gradle build system a lot for most of my Unity games (needed for some third party SDK's) and it does work after some gradle and manifest file tweaking.

    I have not used 5.5 specifically, but I'm currently using 5.4.2f2 and you can get it to work.

    While not an overly helpful response, try googling for "A library uses the same package as this project unity" (without the quotes) and you'll get various problems that cause this and various solutions, you'll likely get it worked out after trying a few.

    The Facebook SDK is a common culprit.

    I usually remove all .AAR files from the unity project and copy them into the android studio project after importing the unity project into android studio. This can eliminate a number of issues. I copy them into the resulting projects libs folder and include the corresponding compile line in the dependencies section of the gradle.build file
     
    liortal likes this.
  5. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    well, it may be common issue but it doesn't make sense that I have to learn a whole new build system, the ins and outs of aar, jar, android studio folder structure and all that jazz just to compile my game.
    If facebook sdk is known to fail or google sdk is known to fail, get us a version that works out of the box right? both companies work with unity at so many levels it doesn't make sense they create an sdk that doesn't work when switching build option and enforces the user to spend hours researching and learning stuff not related to game development at all.

    At the very least they should provide a tutorial on how to get it to compile on unity.
     
  6. creat327

    creat327

    Joined:
    Mar 19, 2009
    Posts:
    1,756
    and btw, I would love to continue using the default system but unity doesn't allow me because of some 65k reference count limitation on the jars. Either way, I hope it's not the end user job to figure this stuff out because they are going to lose countless hours instead of focusing on game making.
     
    litebox likes this.
  7. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562
    Totally agree. I think there's a problem with the current Facebook SDK. They use bolts which seems to cause an issue when using gradle.

    They can fix this, but they should be aware of the issue first... 5.5 is still not released. And who knows how many devs have actually tried gradle?

    I reported the FB SDK bug last night. We will see if Unity will resolve this, or if Facebook should be the ones to come up with a solution.
     
  8. larku

    larku

    Joined:
    Mar 14, 2013
    Posts:
    1,422
    While I agree that it would be great to have everything always work "out-of-the-box" that is never going to happen with third party SDK's across all platforms and all tools - software development is never that simple. If it was, everyone could do it.

    You're going to have many different integration issues. Even if they coordinated with Facebook and Google and streamlined everything, you're still going to get issues with the next SDK you use. To make everything work perfectly means "nothing-could-ever-change", obviously that 'aint gonna happen.

    FWIW, I don't think Facebook gives a hoot about developers - their only focus is users (their product) and their advertisers (their revenue stream). So I'd expect Unity have zero influence on Facebook, they're insignificant to their business.

    They? You mean Unity or Facebook? Facebook doesn't care about Unity developers, and it's a third party library from Unity's perspective. I'm not sure I see a fit here.
     
  9. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,562