-
Notifications
You must be signed in to change notification settings - Fork 524
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
[Xamarin.Android.Build.Tasks] use --input-list
for CompileToDalvik.
#2187
Conversation
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 think this one is good if the Windows build is green.
} | ||
sw.WriteLine (zip); | ||
foreach (var jar in JavaLibrariesToCompile) | ||
sw.WriteLine (jar.ItemSpec); |
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.
Ditto here: do we need to quote the paths?
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.
Will check
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.
Weird this is what happens on Mac if I quote the files in the input list
/usr/bin/java -Xmx1G -jar /Users/dean/android-toolchain/sdk/build-tools/28.0.0/lib/dx.jar --dex --no-strict --input-list=/var/folders/n_/vt_nzq1n04schx5yy2jgcgcw0000gn/T/tmp799bbfa5.tmp --output obj/Debug/android/bin
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: "/Users/dean/Documents/Sandbox/Xamarin/xamarin-android/bin/Debug/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v9.0/mono.android.jar": file not found
at com.android.dex.util.FileUtils.readFile(FileUtils.java:51)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:168)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:143)
at com.android.dx.command.dexer.Main.processOne(Main.java:678)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:575)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:310)
at com.android.dx.command.dexer.Main.runDx(Main.java:288)
at com.android.dx.command.dexer.Main.main(Main.java:244)
at com.android.dx.command.Main.main(Main.java:95)
This is the file
"/Users/dean/Documents/Sandbox/Xamarin/xamarin-android/bin/TestDebug/temp/BuildReleaseAppWithA InIt(FalseFalseFalse)/obj/Debug/android/bin/classes.zip"
"/Users/dean/Documents/Sandbox/Xamarin/xamarin-android/bin/Debug/lib/xamarin.android/xbuild-frameworks/MonoAndroid/v9.0/mono.android.jar"
"/Users/dean/Documents/Sandbox/Xamarin/xamarin-android/bin/TestDebug/temp/BuildReleaseAppWithA InIt(FalseFalseFalse)/Hello (World).jar"
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.
So Mac does not like quotes... I will test on windows.
throw new FileNotFoundException ($"'{zip}' does not exist. Please rebuild the project."); | ||
} | ||
sw.WriteLine (zip); | ||
foreach (var jar in JavaLibrariesToCompile) |
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.
Indentation/scope implies that you can't have both JavaLibrariesToCompile
and AlternativeJarFiles
at the same time. Is this intentional? Why?
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 have no idea, this is just a rework of the existing code. Will need to look at when AlternativeJarFiles
were added.
} | ||
sw.WriteLine (zip); | ||
foreach (var jar in JavaLibrariesToCompile) | ||
sw.WriteLine (jar.ItemSpec); |
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.
Should this be Path.GetFullPath (jar.ItemSpec)
?
d0c6e07
to
78c9e19
Compare
@jonpryor OK so I tested the Input list on Windows. If you include Quotes you get the same error as you do on Mac
Without Quotes, paths with spaces work fine. Here is a sample of the test one I used on Windows
|
fc0652b
to
b9c5103
Compare
build |
1 similar comment
build |
The `dx` tool has an additional argument `--input-list` which can be used to provide a list of `.jar`, `.class` or `.zip` files to the tool. This will help with reducing the length of the command line on larger apps with allot of jav references.
13cfef5
to
ed1bd8b
Compare
@@ -47,6 +47,7 @@ | |||
+ [XA1000](xa1000.md): There was an problem parsing {file}. This is likely due to incomplete or invalid xml. | |||
+ [XA1001](xa1001.md): AndroidResgen: Warning while updating Resource XML '{filename}': {Message} | |||
+ [XA1002](xa1002.md): We found a matching key '{Key}' for '{Item}'. But the casing was incorrect. Please correct the casing |
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.
After upgrading a visual studio i am getting this error in all of the xml for namespace.
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.
@prash6001 can you open an issue and provide Diagnostic build logs so someone can give you a had to narrow down the cause.
The
dx
tool has an additional argument--input-list
whichcan be used to provide a list of
.jar
,.class
or.zip
files to the tool.
This will help with reducing the length of the command line
on larger apps with allot of java references.