I have to build an aar module for Unity3D, but there are too many issues to do so.
My working environment
Unity3D: 5.6.f1
Android Studio: 2.3.3
build tools: 25.0.2
SDK tool: 24.4
I have built an aar file and unziped it to removed the classes.jar
in libs
, afterwards I copied the aar file and AndroidManifest.xml to asset\Plugins\Android. The package name of both, the android project and the unity project, are the same.
Building the APK File afterwards, resulted in the following exception:
IOException: Failed to Move File / Directory from 'Temp/StagingArea/android-libraries/app-debug/classes.jar' to 'Temp/StagingArea/android-libraries/app-debug/libs/classes.jar'.
UnityEditor.Android.PostProcessor.Tasks.ProcessAAR.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTargetGroup targetGroup, BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:186)
UnityEditor.HostView:OnGUI()
I've been looking for an answer for 3 days and I've tried everything I have found online, please help!
I'm pretty sure there is nothing inside the aar files libs
folder