Closed MSLukeWest closed 1 week ago
@MSLukeWest do you have the binlog file which contains the error?
Hi @MSLukeWest. We have added the "need-info" label to this issue, which indicates that we have an open question for you before we can take further action. This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.
MauiApp7_Debug_AnyCPU_net9.0-android_DesignTimeBuild_2024-09-04T13_54_37.3636355-07_00.binlog.txt
@dellis1972 - I've attached the binlog. I had to rename it to a .txt file because .binlog can't be attached.
A guess to what's happening is:
<GetJavaPlatformJar/>
does not appear to log errors or abort the build during a $(DesignTimeBuild)
; it can't find android.jar
for API 35<GenerateRtxt/>
has [Required] public string JavaPlatformJarPath
, and so we get an error@MSLukeWest can you confirm, you don't have this installed?
A guess to what's happening is:
- API 35 is not installed
<GetJavaPlatformJar/>
does not appear to log errors or abort the build during a$(DesignTimeBuild)
; it can't findandroid.jar
for API 35<GenerateRtxt/>
has[Required] public string JavaPlatformJarPath
, and so we get an error@MSLukeWest can you confirm, you don't have this installed?
@jonathanpeppers - I checked, and I do have this installed now. However, I can tell by the timestamps of the folders in "Program Files (x86)\Android\android-sdk\platforms\android-35" that it wasn't installed until 1 minute after I got this error.
I was able to reproduce in an integration test.
And we can fix the error message above:
But it still fails later during <Csc/>
with:
UnnamedProject\MainActivity.cs(15,29): error CS0117: 'Resource' does not contain a definition for 'Layout'
UnnamedProject\MainActivity.cs(17,48): error CS0117: 'Resource' does not contain a definition for 'Id'
It wasn't able to generate Resource.designer.cs
without the android.jar
platform jar, and so the build would still fail.
Android framework version
net9.0-android
Affected platform version
9.0.100-preview.7.24407.12
Description
Occasionally when I have my MAUI project open in Visual Studio, I see this error in the error list:
MSB4044: The "GenerateRtxt" task was not given a value for the required parameter "JavaPlatformJarPath"
I took a look at the .binlog file, and I see that the problem is that the GetJavaPlatformJar task that runs earlier is failing to set the JavaPlatformJarPath property.
Steps to Reproduce
MSB4044: The "GenerateRtxt" task was not given a value for the required parameter "JavaPlatformJarPath"
Did you find any workaround?
Rebuilding or reopening the project sometimes works
Relevant log output
No response