Comments (7)
Hi!
Could you provide please more info:
- what version of android gradle plugin do you use?
- what version of aspectj plugin do you use?
- maybe a minimal reproduceable project you can share?
from android-gradle-aspectj.
Hi!
gradle plugin & aspectJ plugin version:
classpath "com.android.tools.build:gradle:4.0.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.archinamon:android-gradle-aspectj:4.2.1'
android version:
android {
compileSdkVersion 29
buildToolsVersion "29.0.3"
defaultConfig {
applicationId "com.foo.aop"
minSdkVersion 19
targetSdkVersion 29
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
from android-gradle-aspectj.
This is also happening for me. It seems to be linked to having multiple variants and using includeJars
- possibly the jars are being included for each variant?
from android-gradle-aspectj.
Note, after a little more investigation the additional variants aren't the issue. I've opened a PR that includes a failing test showing the issue ☝️
I'm happy to fix this, but any pointers would be helpful - from what I can tell the processed classes are being included along with the original dependency when the multi dexing is being done?
from android-gradle-aspectj.
I have pinpointed the problem as the addition of copying the include jars that resolves #108 and updated my PR to revert this change and add a test for both this issue and 108.
(@Archinamon please review when you can)
from android-gradle-aspectj.
@superafroman
Hi! Sorry for being offline for so long. I've took a look at your code. It seems have to work, but I'll test in my production project first before commiting public packages.
Thank's for your contribution!
from android-gradle-aspectj.
@superafroman This change, which was released in the 4.3.0 version of the plugin today, seems to have re-introduced issue #108
AGP v4.1.0 and android-gradle-aspectj v3.4.0
This branch on my sample project is exhibiting the issue for reference:
https://github.com/jdvp/AndroidAspectExample/tree/feature/agp-4.1.0
Stacktrace if interested:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: me.jdvp.androidaspectexample.debug, PID: 5225
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/appcompat/R$drawable;
at androidx.appcompat.widget.AppCompatDrawableManager$1.<init>(AppCompatDrawableManager.java:63)
at androidx.appcompat.widget.AppCompatDrawableManager.preload(AppCompatDrawableManager.java:57)
at androidx.appcompat.app.AppCompatDelegateImpl.<init>(AppCompatDelegateImpl.java:336)
at androidx.appcompat.app.AppCompatDelegateImpl.<init>(AppCompatDelegateImpl.java:286)
at androidx.appcompat.app.AppCompatDelegate.create(AppCompatDelegate.java:230)
at androidx.appcompat.app.AppCompatActivity.getDelegate(AppCompatActivity.java:554)
at androidx.appcompat.app.AppCompatActivity.attachBaseContext(AppCompatActivity.java:107)
at android.app.Activity.attach(Activity.java:7899)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3401)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3601)
at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:85)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:135)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:95)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2066)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:223)
at android.app.ActivityThread.main(ActivityThread.java:7656)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)
Caused by: java.lang.ClassNotFoundException: Didn't find class "androidx.appcompat.R$drawable" on path: DexPathList[[zip file "/data/app/~~oR4sHx3yVPaRSB1KduWpUQ==/me.jdvp.androidaspectexample.debug-I1VyhpPc3vfvewIIUTYhow==/base.apk"],nativeLibraryDirectories=[/data/app/~~oR4sHx3yVPaRSB1KduWpUQ==/me.jdvp.androidaspectexample.debug-I1VyhpPc3vfvewIIUTYhow==/lib/x86, /system/lib, /system_ext/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:207)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
from android-gradle-aspectj.
Related Issues (20)
- Can't debug .aj file in Android Studio HOT 5
- Unable to find method 'com.android.build.gradle.BasePlugin.getVariantManager() HOT 1
- ERROR: Unable to find method 'com.android.build.gradle.internal.variant.BaseVariantData.getVariantDslInfo()Lcom/android/build/gradle/internal/core/VariantDslInfo;'. HOT 2
- Help me!!! xxx is defined multiple times: HOT 2
- Is there any way to intercept the andrid framework methods? HOT 1
- Problems with includeJar in multimodule project
- VariantUtils.kt # findSourcesForVariant() need to improve
- Aspectj-ext 4.2.1 and AGP 4 hangs for multi-module app when using includeJar on feature module HOT 1
- Caused by: java.lang.NoClassDefFoundError:
- please help me!! i hit : cannot cast the outer type to a reference type. HOT 3
- Build failing with `NoSuchMethodError: ...VariantManager.getVariantScopes()Ljava/util/List` when using Android Gradle Plugin 4.1.0 HOT 10
- Can this plugin support incremental building? HOT 1
- AGP 4.1.1: java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/appcompat/R$drawable HOT 1
- Is the plugin no longer supported? HOT 1
- Migration from JCenter HOT 2
- Is someone able to host the latest 4.3.0 plugin somewhere?
- Not Compatible with AGP 7.x. | No such method error | Can't use with Jetpack Compose
- Could not resolve plugin artifact in repository
- Recommended new Android AOP framework https://github.com/FlyJingFish/AndroidAOP/blob/master/README_EN.md
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-gradle-aspectj.