Coder Social home page Coder Social logo

Comments (2)

firefly1126 avatar firefly1126 commented on July 24, 2024

Execution failed for task ':app:transformClassesWithExtractJarsForInternalDebug' occurs when two or more java class files conflict. your project dependencies the library(aspectjx) and the jar(com.hujiang.aspectjx:gradle-android-plugin-aspectjx:1.0.9) at the same time, it is the reason.

from gradle_plugin_android_aspectjx.

hiworld75018 avatar hiworld75018 commented on July 24, 2024

I am not sure to understand:

  1. the project declares the classpath to the plugin library (gradle-android-plugin-aspectjx),
  2. the custom android library "aspectjx" contains an @aspect public class and a LibrarySDK class (like the AspectJ demo) and depends on appcompat and aspectjrt libraries,
  3. the app has 2 dependencies (aspectjtools and the "aspectjx" android library), and triggers the plugin at build time.

I can't see where two or more classes conflict... The gradle console gives me this log before failing:

:app:transformClassesWithAspectTransformForInternalDebug
aspect start..........
excludeJar:::[...]
directoryInput:::[...]/.android/build-cache/.../output/data-binding
excludeJar:::[...]/aspectjx/build/intermediates/bundles/default/classes.jar
directoryInput:::[...]/app/build/intermediates/classes/internal/debug
aspect do work..........
Found @DeclareAnnotation while current release does not support it (see 'org.aspectj.weaver.bcel.AtAjAttributes')
aspect jar merging..........
aspect done...................
:app:transformClassesWithAspectTransformForInternalDebug spend 2948ms
:app:transformClassesWithExtractJarsForInternalDebug FAILED
:app:transformClassesWithExtractJarsForInternalDebug spend 2ms
:app:buildInfoGeneratorInternalDebug
:app:buildInfoGeneratorInternalDebug spend 1ms

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:transformClassesWithExtractJarsForInternalDebug'.
    ...

To get around the problem, is there any way to restrict code weaving to a few classes, using IncludeJarFilter and ExcludeJarFilter ?

from gradle_plugin_android_aspectjx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.