Coder Social home page Coder Social logo

Comments (9)

Kingwentao avatar Kingwentao commented on September 27, 2024 1

我exclude下面这些就解决了:
aspectjx {
//排除所有package的class文件及库(jar文件)
exclude 'androidx'
exclude 'com.google'
exclude 'org.jetbrains.kotlin'
exclude 'com.squareup'
exclude 'android.support'
exclude 'versions.9'
exclude 'module-info'
}

from gradle_plugin_android_aspectjx.

wille-89 avatar wille-89 commented on September 27, 2024

kotlin 降级到 1.4 尝试一下?

from gradle_plugin_android_aspectjx.

136617259 avatar 136617259 commented on September 27, 2024

我也是这样的问题 降了也不管用

from gradle_plugin_android_aspectjx.

leeyushi avatar leeyushi commented on September 27, 2024

经过比对和测试,发现结合Koutlin使用会发生以下问题:
1 Kotlin的版本:
测试1.3.61是没有问题的,测试1.5.20会报 Cause: zip file is empty 错误。
2 AspectJ使用:
引入Kotlin使用,必须要给某个类声明@aspect注解,否则会报找不到启动类(如果项目中有自定义的Application,那么会报找不到Application,如果项目中没有Application,那么项目中会报找不到启动类XXXActivity)
该问题在纯Java项目中并不会出现(不给某个类声明@aspect注解也不会报错),Kotlin+Java结合使用会出现该情况。

from gradle_plugin_android_aspectjx.

AnShiHui avatar AnShiHui commented on September 27, 2024

经过比对和测试,发现结合Koutlin使用会发生以下问题: 1 Kotlin的版本: 测试1.3.61是没有问题的,测试1.5.20会报 Cause: zip file is empty 错误。 2 AspectJ使用: 引入Kotlin使用,必须要给某个类声明@aspect注解,否则会报找不到启动类(如果项目中有自定义的Application,那么会报找不到Application,如果项目中没有Application,那么项目中会报找不到启动类XXXActivity) 该问题在纯Java项目中并不会出现(不给某个类声明@aspect注解也不会报错),Kotlin+Java结合使用会出现该情况。

1.3.61就会找不到application

from gradle_plugin_android_aspectjx.

leeyushi avatar leeyushi commented on September 27, 2024

经过比对和测试,发现结合 Koutlin 使用会发生以下问题: 1 Kotlin 的版本: 测试 1.3.61 是没有问题的,测试 1.5.20 会报 原因:zip 文件为空错误。 2 AspectJ 使用:引入 Kotlin 使用,必须要给某个类声明@aspect注解,否则会报找不到启动类(如果项目有自定义的申请,那么就会找到申请,如果项目中没有申请,那么项目中会报不到启动类XXXActivity)该问题在纯Java项目中并不会出现(不给某类声明@aspect注解不会报错),Kotlin+Java结合使用会出现该情况。

1.3.61 可能找不到申请

新建一个类,给这个类添加上注解@aspect

from gradle_plugin_android_aspectjx.

carpediemvv avatar carpediemvv commented on September 27, 2024

这个怎么解决呢?
怎么给关了

from gradle_plugin_android_aspectjx.

AlphaBoom avatar AlphaBoom commented on September 27, 2024

我exclude下面这些就解决了: aspectjx { //排除所有package的class文件及库(jar文件) exclude 'androidx' exclude 'com.google' exclude 'org.jetbrains.kotlin' exclude 'com.squareup' exclude 'android.support' exclude 'versions.9' exclude 'module-info' }

还要加上协程的类,Aspectjx也会导致Kotlin协程相关类找不到

exclude 'kotlinx.coroutines'

from gradle_plugin_android_aspectjx.

wurensen avatar wurensen commented on September 27, 2024

@leeyushi 可以使用我fork过来维护的插件,这些问题都有修复。#332

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.