0

building a native react-native package because i need to implement a sdk, but when running rebuild project i get this entire error:

Direct local .aar file dependencies are not supported when building an AAR. The resulting AAR would be broken because the classes and Android resources from any local .aar file dependencies would not be packaged in the resulting AAR. Previous versions of the Android Gradle Plugin produce broken AARs in this case too (despite not throwing this error). The following direct local .aar file dependencies of the :react-native-innity project caused this error: /Users/xxxx/Desktop/xxxxx/android/libs/sdk.aar

tried a few solutions but looks no one is working.

have this in my build.gradle in dependencies:


dependencies {
    implementation fileTree(dir: "./libs", include: ["*.jar", "*.aar"])
  
    api fileTree(dir: './libs', include: ['*.aar'])

    compileOnly files('./libs/sdk.aar')
    
    implementation files('./libs/sdk.aar')

using flatDir in allprojects - repositiories:


allprojects {
    repositories {
        flatDir {
          dirs 'libs'
        }
    }
}

but error still

dont know why is this happening, tried all the options above

lol69
  • 121
  • 3
  • I think [this question](https://stackoverflow.com/questions/60878599/error-building-android-library-direct-local-aar-file-dependencies-are-not-supp) is similar. – frontz Nov 16 '22 at 22:09
  • @frontz yes, doing the same thing but cant get the project and cant comment in that post – lol69 Nov 17 '22 at 02:32

0 Answers0