Mobbeel / fataar-gradle-plugin

Gradle plugin to help embed dependencies in generated AAR artifact
https://plugins.gradle.org/plugin/com.mobbeel.plugin
Apache License 2.0
340 stars 44 forks source link

Merging resources causing package R to not exist #45

Open adamqure opened 5 years ago

adamqure commented 5 years ago

What are the steps to reproduce this issue?

  1. Add the plugin following the instructions
  2. Run ./gradlew build

What happens?

100 errors in the R.java file, all of them being error: package R does not exist

What were you expecting to happen?

Build completing without these errors

Any logs, error output, etc?

100 similar instances to the following:

{module_directory}/build/tmp/copyDebugDependencies/rs/androidx/viewpager/R.java:5: error: package com.(package_name).R does not exist public static int alpha = com.(package_name).R.attr.alpha;

Any other comments?

Module Gradle Dependencies:

dependencies { def lifecycle_version = '2.0.0-beta01' def paging_version = '2.0.0-beta01' def anko_version = '0.10.8' def lottieVersion = '3.0.1'

implementation 'com.facebook.android:facebook-login:[4,5)'
api fileTree(include: ['*.jar'], dir: 'libs')
api 'androidx.appcompat:appcompat:1.1.0-alpha05'
api 'androidx.recyclerview:recyclerview:1.1.0-alpha05'
api 'com.google.android.material:material:1.1.0-alpha06'
api 'androidx.emoji:emoji:1.0.0'
api 'androidx.emoji:emoji-bundled:1.0.0'
api 'androidx.emoji:emoji-appcompat:1.0.0'
api 'de.hdodenhof:circleimageview:3.0.0'
testImplementation 'junit:junit:4.13-beta-3'
androidTestImplementation 'androidx.test:runner:1.1.0-alpha4'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0-alpha4'
api 'androidx.constraintlayout:constraintlayout:2.0.0-alpha5'
api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
api(name: 'dms', ext: 'aar')
api(name: 'audiohelper', ext: 'aar')
api 'com.squareup.retrofit2:retrofit:2.5.0'
api 'com.squareup.retrofit2:converter-gson:2.5.0'
api project(':camerahelper')
api 'com.google.android.gms:play-services-maps:16.0.0'
api 'com.google.android.gms:play-services-location:16.0.0'
api "androidx.lifecycle:lifecycle-extensions:$lifecycle_version"
api "androidx.paging:paging-runtime:$paging_version"
implementation 'com.github.bumptech.glide:glide:4.9.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.9.0'
api 'androidx.multidex:multidex:2.0.0'
api 'com.braintreepayments:card-form:3.3.0'
api 'com.shuhart.stickyheader:stickyheader:1.0.5'
api "org.jetbrains.anko:anko:$anko_version"
api 'io.smooch:core:5.17.4'
api 'io.smooch:ui:5.17.4'
api 'com.google.zxing:core:3.3.3'
api 'io.branch.sdk.android:library:3.+'
api 'androidx.legacy:legacy-support-v4:1.0.0-beta01'
api 'com.pawegio.kandroid:kandroid:0.6.12@aar'
api 'com.github.jinatonic.confetti:confetti:1.1.2'
api 'com.google.android.gms:play-services-auth:16.0.1'
api 'org.jsoup:jsoup:1.11.3'
api 'android.arch.navigation:navigation-fragment:1.0.0'
api 'androidx.cardview:cardview:1.0.0-beta01'
api "com.airbnb.android:lottie:$lottieVersion"
api 'androidx.viewpager:viewpager:1.0.0'
api project(':DragToClose')
api 'com.hbb20:ccp:2.2.9'
api 'com.google.firebase:firebase-auth:16.0.4'
api 'joda-time:joda-time:2.10.2'
api "com.mixpanel.android:mixpanel-android:5.5.0"
api 'com.google.android.gms:play-services-analytics:16.0.8'
api 'com.xwray:groupie:2.3.0'
api 'com.xwray:groupie-kotlin-android-extensions:2.3.0'
api 'com.yarolegovich:discrete-scrollview:1.4.9'
api 'com.google.android:flexbox:1.1.0'
api 'com.eightbitlab:blurview:1.6.1'
api 'androidx.test.ext:junit:1.1.1'
api 'androidx.test.espresso:espresso-idling-resource:3.3.0-alpha02'
implementation project(':ccconsumersdk-consumerSwiper-release')

}

Gradle Plugin: 3.4.2 Gradle Version: 5.1.1 FatAAR plugin version: 2.0.1

hborisov1 commented 5 years ago

Any progress with this? I have the same problem

askarsyzdykov commented 5 years ago

same issue

Gradle Plugin: 3.5.0 Gradle Version: 5.4.1 FatAAR plugin version: 2.0.3

HaenaraShin commented 4 years ago

I have same issue

Gradle Plugin: 3.5.0 Gradle Version: 5.4.1 FatAAR plugin version: 2.0.1

> Task :client:compileRsDebug FAILED
/Users/haenara/Documents/HaenaraDev/Android/999_TestProject/MultiModule/client/build/tmp/copyDebugDependencies/rs/androidx/core/ktx/R.java:5: error: package dev.haenara.customer.R does not exist
    public static int alpha = dev.haenara.customer.R.attr.alpha;
                                                    ^
...
dependencies {
    api project(':core')
    api project(':essential')
    api project(':optfeature2')
    api fileTree(dir: 'libs', include: ['*.jar'])
    api "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
    api 'androidx.appcompat:appcompat:1.0.2'
    api 'androidx.core:core-ktx:1.1.0'
    testApi 'junit:junit:4.12'
    androidTestApi 'androidx.test:runner:1.2.0'
    androidTestApi 'androidx.test.espresso:espresso-core:3.1.1'
}
asankasan commented 4 years ago

I have the same issue. gradle:3.5.1

kavinrajbs commented 4 years ago

I have same issue. Gradle Plugin: 3.5.2 Gradle Version: 5.4.1 FatAAR plugin version: 2.0.1

yurii-diachenko commented 4 years ago

I have exactly the same problem with version 2.0.1

Did anyone fix the issue?

askarsyzdykov commented 4 years ago

Unfortunately no, I switched to a similar plugin https://github.com/kezong/fat-aar-android @yurii-diachenko

oscarcpozas commented 4 years ago

@yurii-diachenko sorry, but there's currently no one maintaining the project. However, the PRs are welcome and will be reviewed.

Maja755 commented 4 years ago

@askarsyzdykov Do you actually succeed to create a FAT AAR with the https://github.com/kezong/fat-aar-android ??? I follow the instructions there, and in the created AAR in the end there aren't the classes from the JARs in the "libs" folder

askarsyzdykov commented 4 years ago

@Maja755 I didn't use jar files. I think you should create an issue in the Kezong repository