gorbin / ASNE

ASNE library for simple integration of social networks: Twitter, Facebook, Google Plus, LinkedIn, Instagram, Vkontakte, Odnoklassniki
883 stars 227 forks source link

uses-sdk element cannot have a "tools:node" attribute #46

Closed dcampogiani closed 9 years ago

dcampogiani commented 9 years ago

I've updated Android Studio to version 0.9, and gradle build tools to version 0.14, now when i try to build my application (which is using ASNE) I got this error:

Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed : uses-sdk element cannot have a "tools:node" attribute

I've searched in my code, and I'm not using tools:node="replace" anywhere, but ASNE is using in manifest (both in core and "modules").

Any idea how I can solve this problem?

gorbin commented 9 years ago

I use last stable Android Studio 0.8.6 and remember that there are same error with gradle tools 0.13.2 but than it was fixed check this question and approved answer

just updates to 0.9.1 and gradle tools to 0.4.1

and if it works - can you notify me please? if not I try to reslve it via gradle scripts - main idea of using tools:node="replace" is to resolve merge conflicts with oter libs and make ASNE modular

dcampogiani commented 9 years ago

Thanks for your feedback.

I've already updated to Android Studio 0.9.1 and gradle tools 0.14.1 but this doesn't solve my problem.

I've also Invalidated the caches as suggested here, and this doesn't help.

TheMedo commented 9 years ago

I also have the same problem (and I am the author of the suggestion mentioned above) Trying to assemble a release build w/ Android Studio 0.9.1 and Gradle Tools 0.14.1 reproduces the error.

TheMedo commented 9 years ago

I found a temporary workaround:

  1. Open your project with Android Studio 0.8.14 / Gradle build tools 0.13.2
  2. Build your project ex. gradlew assembleRelease
  3. Switch back to Android Studio 0.9.1 / Gradle build tools 0.14.1
  4. gradlew assembleRelease will work now

I'm guessing the manifest was already merged for that specific build type. This means any change to the manifest file will require new manifest merger.

edward-s commented 9 years ago

is it possible to remove tools:node="replace" in ASNE? i can't compile my project when using ASNE on AS 0.9.2, Gradle tools 0.14.1 tried every method to get it compiled but failed and the workaround by @TheMedo is not an option for me

edward-s commented 9 years ago

using this workaround compiles my app

android.applicationVariants.all { variant -> variant.processResources.manifestFile = file('src/main/AndroidManifest.xml') variant.processManifest.enabled=false }

but it slows my app down. i.e: listview doesn't scroll smoothly anymore.

alenz316 commented 9 years ago

I am also with @edward-s: AS 0.9.2, Gradle 0.14.1, and Android build tools 21.1.1.

@TheMedo workaround is not an option and @edward-s workaround is not an option either since I have multiple builds with different package names and references that require that to be turned on.

@gorbin is removing tools:node="replace" in ASNE an option?

quentin23soleil commented 9 years ago

Same here, is it possible to remove tools:node from ASNE without causing to much problems?

gorbin commented 9 years ago

I was in the hospital and could not keep track of the project or fix anything but for now I'm fine and very grateful to you for the issues. I am very interested in this project and will develop it further.

If I remove tools:node it should break merge different libraries in project, trying to find another solution. Work on it now...

I agree with @alenz316 workaround with different studios not an option - try to find another way to solve it. But hot fix until I solve it

Thanks everyone for your support

kiratheone commented 9 years ago

sory for my bad language i've an alternnative for this issue new android studio

  1. Setting your gradle from @gorbin 's link on first answer
  2. Manual merge Manifest library to your App manifest. ex: when using ASN FB library, you must add like permission , activity and etc from ASN FB manifest to your manifest. if already exist, do not add anymore.
  3. Rebuild your project

Until now, @gorbin 's ASN library work fine for me. of course with new version android studio :)

I hope this studio android issue resolved soon, Thanks

gorbin commented 9 years ago

I remove uses-sdk and fully update all to last versions of libs and sdks It works fine in my dev studio, but not sure in stable version - will check it soon

TheMedo commented 9 years ago

Excellent news! Let us know when the latest version is available on Maven Central :)

quentin23soleil commented 9 years ago

Woohaa! Go for it!

On Thu, Nov 20, 2014 at 2:29 PM, TheMedo notifications@github.com wrote:

Excellent news! Let us know when the latest version is available on Maven Central :)

— Reply to this email directly or view it on GitHub https://github.com/gorbin/ASNE/issues/46#issuecomment-63807472.

Quentin DOMMERC Android developer Linkedin http://www.linkedin.com/in/quentindommerc Twitter http://twitter.com/kentin_dommerc

ghatasheh commented 9 years ago

THANK YOU!

gorbin commented 9 years ago

just released 0.3.3 version to maven - fully updated to sdk, api, plagins versions Checked in stable and canary studios - got only one problem with gradle sdk version - update project gradle sdk version to 2.1

p.s. it need few hours to update maven central repo - just wait a bit)

ChrisMCMine commented 9 years ago

Seems to work fine now with 0.3.3, thanks for fixing it!

feliu commented 9 years ago

thank you!!!

vishnuchd commented 9 years ago

Still have the Problem. Please Help

matantsu commented 9 years ago

updated to 0.3.3 now the problem is:

Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
    /root/Android/Sdk/build-tools/21.1.2/dx --dex --no-optimize --output /home/matan/AndroidStudioProjects/Stars/app/build/intermediates/dex/debug --input-list=/home/matan/AndroidStudioProjects/Stars/app/build/intermediates/tmp/dex/debug/inputList.txt
  Error Code:
    2
  Output:
    UNEXPECTED TOP-LEVEL EXCEPTION:
    com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
        at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:502)
        at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:277)
        at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:491)
        at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:168)
        at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
        at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:454)
        at com.android.dx.command.dexer.Main.runMonoDex(Main.java:303)
        at com.android.dx.command.dexer.Main.run(Main.java:246)
        at com.android.dx.command.dexer.Main.main(Main.java:215)
        at com.android.dx.command.Main.main(Main.java:106)
4emodan commented 9 years ago

@matantsu your problem is not related. You have over 65k methods in your project. Check https://developer.android.com/tools/building/multidex.html

mohamed-habib commented 9 years ago

I still have this problem,

Android Studio 1.2.2

mohamed-habib commented 9 years ago

I Found a solution to this problem,

In AndroidManifest file -add this line to mainfest tag: xmlns:tools="http://schemas.android.com/tools"

-add this tag: <uses-sdk tools:node="merge" android:minSdkVersion=MIN_SDK android:targetSdkVersion=TARGET_SDK />

deniszink commented 9 years ago

@mohamed-habib, can you post some code?

mohamed-habib commented 9 years ago

I don't understand what code exactly do you want? my last comment was code to be written in the manifest file.

falkolab commented 8 years ago

<uses-sdk tools:node="merge" android:minSdkVersion="MIN_SDK" android:targetSdkVersion="TARGET_SDK" />