Skip to content
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

The Android Net8 Binding does not have the proper objects. #17

Open
Elinares-82 opened this issue Mar 30, 2024 · 9 comments
Open

The Android Net8 Binding does not have the proper objects. #17

Elinares-82 opened this issue Mar 30, 2024 · 9 comments

Comments

@Elinares-82
Copy link

I'm opening a new issue since the issue #13 didn't fixed for Android.

I provided all the information in the same #13

@Anush-Shand
Copy link
Contributor

@Elinares-82 Are you including the clevertap dependecy using an Assembly Reference (.dll file)? If yes then the .aar file should reside in the same directory as the .dll file. This is because of the reason mentioned here

You can also consider using the clevertap dependency directly from NuGet https://www.nuget.org/packages/CleverTap.DotNet.Android.Binding/

@Elinares-82
Copy link
Author

@Elinares-82 Are you including the clevertap dependecy using an Assembly Reference (.dll file)? If yes then the .aar file should reside in the same directory as the .dll file. This is because of the reason mentioned here

You can also consider using the clevertap dependency directly from NuGet https://www.nuget.org/packages/CleverTap.DotNet.Android.Binding/

Hi @Anush-Shand , I’m using the nuget instead of the DLL directly.

@Anush-Shand
Copy link
Contributor

@Elinares-82
Does it work with the NuGet pkg. Please try clean and build once.
I tried using the nuget package on a fresh demo app and it works fine
Screenshot 2024-04-01 at 11 55 16 AM

This .dll has a smaller size than the older one because of the details mentioned here

The VS solution you had attached also looks fine. The version of clevertap .aar added is old though

@Elinares-82
Copy link
Author

@Elinares-82 Does it work with the NuGet pkg. Please try clean and build once. I tried using the nuget package on a fresh demo app and it works fine Screenshot 2024-04-01 at 11 55 16 AM

This .dll has a smaller size than the older one because of the details mentioned here

The VS solution you had attached also looks fine. The version of clevertap .aar added is old though

@Anush-Shand thanks for your response. I'm using VS 2022 17.9.5 and using both approaches I'm getting the same result. The namespace is not being detected. Could you please use the same IDE, I assume that you are using VS Code for Mac o VS for Mac?

image

image

image

@Anush-Shand
Copy link
Contributor

Anush-Shand commented Apr 2, 2024

@Elinares-82 Currently I am using VS for mac version 17.6.10. I will try testing on other versions.
In the meantime can you try adding the Clevertap Binding as a project reference using the .dll file. Make sure to include the clevertap .aar in the same directory as the .dll file

@Elinares-82
Copy link
Author

@Elinares-82 Currently I am using VS for mac version 17.6.10. I will try testing on other versions. In the meantime can you try adding the Clevertap Binding as a project reference using the .dll file. Make sure to include the clevertap .aar in the same directory as the .dll file

@Anush-Shand thanks!, What I did was update my Android binding project using the latest .aar version 6.1.1 and generate the full assembly instead. I know that MAUI changed this to use the second approach but apparently there are a bug in VS 2022 since is not recognizing the namespace if the .aar is in a different file.

Havin said this, I used the nuget for iOS that until now is working as expected, and Android is using an embedded .aar assembly. Let me know if you can test the Android nuget in VS 2022 since that I read is the VS for Mac will be retired.

Thanks again.

@Anush-Shand
Copy link
Contributor

@Elinares-82 It is good to hear that there are no blockers from Clevertap's side at the moment

I tried testing the issue on a different machine and I was able to reproduce the issue.
I then added the Clevertap android dependency as an Assembly reference. Following this I removed the assembly reference and then added the Nuget package and the issue magically went away forever. Seems like some VisualStudio caching issue.
You can try the same?
It will also be helpful if you can create a dummy project where the issue is reproducible and share the zipped project

@Elinares-82
Copy link
Author

I then added the Clevertap android dependency as an Assembly reference.

Hi @Anush-Shand ,

Yes, I did this several times, however, the project did compile since the namespace was not found. Not sure why this behavior. I'll create a new project to replicate and provide you to detect what is happening.

@Elinares-82
Copy link
Author

Hi,

Definitely compile using the nuget is not possible in VS for Windows. The nuget files are in the target folder but VS is not able to find the clasess.

image

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants