Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
dcampogiani opened this issue Nov 3, 2014 · 25 comments
Closed

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

dcampogiani opened this issue Nov 3, 2014 · 25 comments
Labels

Comments

@dcampogiani
Copy link

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
Copy link
Owner

gorbin commented Nov 5, 2014

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

@gorbin gorbin added the bug label Nov 5, 2014
@dcampogiani
Copy link
Author

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
Copy link

TheMedo commented Nov 5, 2014

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
Copy link

TheMedo commented Nov 6, 2014

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
Copy link

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
Copy link

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
Copy link

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
Copy link

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

@gorbin
Copy link
Owner

gorbin commented Nov 19, 2014

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
Copy link

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 pushed a commit that referenced this issue Nov 20, 2014
@gorbin
Copy link
Owner

gorbin commented Nov 20, 2014

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
Copy link

TheMedo commented Nov 20, 2014

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

@quentin23soleil
Copy link

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
#46 (comment).

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

@ghatasheh
Copy link

THANK YOU!

@gorbin
Copy link
Owner

gorbin commented Nov 21, 2014

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
Copy link

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

@feliu
Copy link

feliu commented Dec 9, 2014

thank you!!!

@vishnuchd
Copy link

Still have the Problem. Please Help

@matantsu
Copy link

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
Copy link

4emodan commented Jan 21, 2015

@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
Copy link

I still have this problem,

Android Studio 1.2.2

@mohamed-habib
Copy link

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:

@deniszink
Copy link

@mohamed-habib, can you post some code?

@mohamed-habib
Copy link

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

@falkolab
Copy link

falkolab commented Feb 3, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests