adwiv / android-fat-aar

Gradle script that allows you to merge and embed dependencies in generted aar file
The Unlicense
1.46k stars 435 forks source link

java.lang.NoClassDefFoundError: Failed resolution of: *****/R$raw; #82

Closed luohaoxin closed 6 years ago

luohaoxin commented 6 years ago

when I use gradle setting like this: gradle-wrapper: distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-all.zip classpath 'com.android.tools.build:gradle:2.3.3' I run application get a crash. so I try to use gradle setting like this: gradle-wrapper: distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-all.zip classpath 'com.android.tools.build:gradle:2.2.3' then the application works properly sorry,my english is poor

hubaoyu commented 6 years ago

i have the same issues.

liuxiaoyao commented 6 years ago

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/inveno/commonlib/R$layout; I have the same issues,my android studio version is 3.0, classpath 'com.android.tools.build:gradle:2.3.3' ,gradle-wrapper: distributionUrl=https://services.gradle.org/distributions/gradle-3.3-all.zip, how to do to solve this issuues?

mazouri commented 6 years ago

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/inveno/commonlib/R$layout; I have the same issues

lavia0229 commented 6 years ago

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/laba/test/lintwo/R$layout; I have the same issue

tommy8421 commented 6 years ago

it seems that the task embedRClass cannot product jar of new generated R*.java to bundle directory. task embedRClass(type: org.gradle.jvm.tasks.Jar, dependsOn: collectRClass) { doLast{ println "EMBED R CLASS" destinationDir file("$bundle_release_dir/libs/") from base_r2x_dir } }

Whoisurdady commented 6 years ago

@tommy8421 Do you know how to solve this problem now?

tommy8421 commented 6 years ago

@Whoisurdady To get the fixed version script, please visit: https://github.com/tommy8421/fat-aar-fixed

liveei commented 6 years ago

@tommy8421 God ! you save my life ! it works with gradle:2.3.0 !!!