Closed habhabsafi closed 2 months ago
I am doing this workaround for the same issue that I found here
https://github.com/brim-borium/spotify_sdk/issues/99#issuecomment-878910598
It works because I am no longer getting the error. however, I am now getting this other error
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':react-native-maps-here:compileDebugKotlin'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
> Compilation error.
...
Exception is:
org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':react-native-maps-here:compileDebugKotlin'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.lambda$executeIfValid$1(ExecuteActionsTaskExecuter.java:142)
at org.gradle.internal.Try$Failure.ifSuccessfulOrElse(Try.java:282)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeIfValid(ExecuteActionsTaskExecuter.java:140)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:128)
...
Caused by: org.gradle.workers.internal.DefaultWorkerExecutor$WorkExecutionException: A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
at org.gradle.workers.internal.DefaultWorkerExecutor$WorkItemExecution.waitForCompletion(DefaultWorkerExecutor.java:348)
at org.gradle.internal.work.DefaultAsyncWorkTracker.lambda$waitForItemsAndGatherFailures$2(DefaultAsyncWorkTracker.java:130)
at org.gradle.internal.Factories$1.create(Factories.java:31)
...
at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:64)
at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:49)
Caused by: org.gradle.api.GradleException: Compilation error.
...
I also upgraded gradle to 8.0.1 because you're using it in example
still same problem
i also installed and ran the example
directory from your repo, and I am getting the same error as the original error in my repo
Execution failed for task ':react-native-maps-here:bundleDebugAar'.
> Error while evaluating property 'hasLocalAarDeps' of task ':react-native-maps-here:bundleDebugAar'.
> 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-maps-here project caused this error: /Users/shabhab/Downloads/react-native-maps-here-main/example/android/app/libs/heresdk-explore-android-4.18.5.0.113335.aar
Hi @habhabsafi, does this issue occur when your developing or when your trying to make a signed aar/apk ?
If so do you have other libraries installed like react-native-vision-camera or react-native-gesture-handler ?
react-native-vision-camera
well, it's happening when i do ./gradlew build
while developing.
yes I do have other libraries, for instance I have react-native-camera, reactive-native-qrcode-scanner and many more.
On top of that, and as per my last comment, I tried to run ./gradlew build
on your example
directory and it threw the same error
Ok I'm exploring it now, the problem seems to be that .aar libraries can't be bundled correctly with the app builds.
@habhabsafi I published a new version: v1.1.0 that aims to fix this issue, but you will need to make some changes on your part:
change the libs
folder name to: heresdk
and move it outside of the app folder.
Meaning your library should be in android/heresdk/heresdk-explore-android-x.x.x.x.x.aar
instead of android/app/libs/heresdk-explore-android-x.x.x.x.x.aar
in your android/app/build.gradle
replace the implementation fileTree(dir: 'libs', include: ['*.aar', '*.jar'])
with implementation fileTree(dir: file("../heresdk"), include: ['*.aar'])
If all goes well, you should build successfully
the build worked, thanks !
I am using the Lib and following the installation instructions of installation.md in a react-native app. environment information:
I am getting this Error
looks like setting an .aar file in
libs
isn't supported, although I am using the same AGP you're using inexample
.