-
-
Notifications
You must be signed in to change notification settings - Fork 914
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
Fix android template issues #1456
base: master
Are you sure you want to change the base?
Conversation
It seems the PR doesn't contain all those 3 changes, only 1 of them (and one unrelated gitignore change)? |
Yes! i'm still investigating it, i should mark it as a draft so far |
I've solved two out of three issues but i have one last related to the resource.designer.cs file generated by xamarin. It creates const fields and sets them in a static function which breaks everything, so i assume there might be a xamarin dependency version issue somewhere, but i can't find anything to help me with that. If any one has a better guess i'd love to hear it |
…nto fix-android-resx
@@ -1,3 +1,2 @@ | |||
<resources> | |||
<string name="app_name"><#= Properties.PackageGameDisplayName #></string> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<Properties.PackageGameDisplayName/> works too, doesn't need to be deleted
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it was only for TextView which You deleted then ignore comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the hint, do you have experience with .NET6 and android? would be nice to get this PR moving forward a bit...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to migrate my Android project from Unity so I've already started looking for the source of the problem with Resources.Designer.cs, but it's harder than i thought. I'll focus on it tomorrow.
@ykafia any ideas how to build nuget packages (....nuget\packages folders) also for net6.0-android when building Stride solution? It builds only for net6.0 and I can't reference some of the stride nuget packages inside Android project. Working on current master branch to resolve the issue with resources and this problem got in my way... |
@Feralnex so I'm not a msbuild expert but I build both Stride.sln and Stride.Android.sln They get added to a local storage, just building is enough to have them available on your machine. There might be another way to build both with one command though |
You can set StridePlatforms=Windows;Android and StrideGraphicsApiDependentBuildAll=true properties in Directory.Build.props |
@manio143 couldn't find file to set those properties, but I noticed that i can run script: set StridePlatforms=Windows;Android
set StrideGraphicsApiDependentBuildAll=true
Stride.sln But it produces errors inside Visual Studio when i try to build GameStudio...
Probably i'm doing something wrong, but before changing those properties everything was fine. |
Maybe the problem lies somewhere else... The reason why I'm asking about it is that after creating Android project in built Stride (and Android earlier) the MyGameActivity.cs has errors:
|
Did you try to rebuild (or clean, then build)? Regarding props file - you can see examples on the web, it's very similar to how csproj is written. |
@manio143 even during clean similar errors pop up... when trying to rebuild over 12k errors pop up... |
Just a sanity check, did you check out the stride sources with git lfs enabled? |
@tebjan yes |
If anyone has time to try this, I'll do something this weekend if I get some time. The resource designer issue might be an issue of conflicting namespace |
Is this still an issue after this merge? #1428 |
Changed this to draft given the conflicts introduced by #1833 |
PR Details
Noticed 3 issues in the android template :
const int
and are tried to be set, possible resource file issueTypes of changes
Checklist
app_text
toapp_name
.resources.designer.cs
generation.