-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug with AndroidPostBuildProcessor on v5.0.0 #144
Comments
Hi @jzapdot. Thank you for raising this issue. Can you include the full console output of the exception (with the full stack trace) and the exact steps you take before it appears ? Do you overwrite an existing apk/aar file when building or creating a new one ? |
Hi @vasct , The issue is that the copy The result is the same whether there is an existing AAB file or not. StackTrace
It seems like the folder copy portion is intended to support a custom templates feature which we do not use on this project. It might be wise to also avoid attempting to copy files if there are not any custom templates in the Here is a different log where I've modified this post-processor to print the Modified source private static void AndroidPostProcess(string path)
{
string androidProjectPath = path + "/unityLibrary/clevertap-android-wrapper.androidlib";
// I've changed this to print out the source and destination paths, but the original copy logic has been preserved.
var srcPath = Path.Combine(Application.dataPath, EditorUtils.CLEVERTAP_ASSETS_FOLDER);
var destPath = Path.Combine(androidProjectPath, $"assets/{EditorUtils.CLEVERTAP_APP_ASSETS_FOLDER}");
Debug.Log($"srcPath => {srcPath}");
Debug.Log($"destPath => {destPath}");
// copy assets to the android project
EditorUtils.DirectoryCopy(
srcPath,
destPath,
true, true, new System.Collections.Generic.HashSet<string>() { EditorUtils.CLEVERTAP_CUSTOM_TEMPLATES_FOLDER });
// copy CleverTapSettings to the project's AndroidManifest
CopySettingsToAndroidManifest(androidProjectPath);
} Output |
The
AndroidPostBuildProcessor
throws anIOException
when building for.aab
or.apk
Android projects as the destination path does not exist. It appears that processor is intended to copy information to nested files in the Android studio project, but the destination directories/files won't exist for.aab
or.apk
targets.Offending code
I fixed this locally with a workaround by checking the build path and early returning if the build path ends in
.aab
or.apk
.Fixed code
The text was updated successfully, but these errors were encountered: