HI
I know this Asset naming problem is known, just it would be nice to correct
samples on github for those which are not familiar with this issue and
for those
to come.
For a purpose of one presentationfor several students, just pulled src
from github
yesterday and got error.
Problem:
1. Select device started, message "Packaging Application"
2. new window "Packaging failed"
Could not create the Android package. See the Output (Build) window
for more details.
3. Output/Build:
C:\Program Files\MSBuild\Novell\mandroid.exe -v --nosign
--sdk-dir="C:\Program Files\Android\android-sdk-windows"
--builddir="D:\SRC\MonoDroid\monodroid-samples\ApiDemo\obj\Debug\android"
--framework-dir="C:\Program Files\Reference
Assemblies\Microsoft\Framework\MonoAndroid\v2.2"
--framework-dir="C:\Program Files\Reference
Assemblies\Microsoft\Framework\MonoAndroid\v1.0"
-S="D:\SRC\MonoDroid\monodroid-samples\ApiDemo\obj\Debug\res"
--package="mono.samples.apidemo" --nolink --abi="armeabi"
--java-sdk-dir="C:\Program Files\Java\jdk1.6.0_26" --debug
--manifest-template="D:\SRC\MonoDroid\monodroid-samples\ApiDemo\Properties\AndroidManifest.xml"
--sdk-platform="8"
-A="D:\SRC\MonoDroid\monodroid-samples\ApiDemo\obj\Debug\assets"
"D:\SRC\MonoDroid\monodroid-samples\ApiDemo\bin\Debug\MonoDroid.ApiDemo.dll"
"C:\Program Files\Reference
Assemblies\Microsoft\Framework\MonoAndroid\v2.2\Mono.Android.dll"
"C:\Program Files\Reference
Assemblies\Microsoft\Framework\MonoAndroid\v1.0\mscorlib.dll"
"C:\Program Files\Reference
Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Core.dll"
"C:\Program Files\Reference
Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.dll"
"C:\Program Files\Reference
Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.dll"
"C:\Program Files\Reference
Assemblies\Microsoft\Framework\MonoAndroid\v1.0\System.Xml.Linq.dll"
MonoDroid.Utils.CommandFailedException: Operation is not valid
due to the current state of the object
at
MonoDroid.Utils.ProcessRocks+<ReadStandardOutput>c__Iterator6.MoveNext
() [0x00000] in <filename unknown>:0
at Monodroid.Toolbox.InvokeCommand (IEnumerable`1 commandLine)
[0x00000] in <filename unknown>:0
at Monodroid.Toolbox.InvokeAapt (System.String packageName)
[0x00000] in <filename unknown>:0
at Monodroid.Droidinator.CreatePackagedResources
(System.Collections.Generic.List`1 javaTypes) [0x00000] in <filename
unknown>:0
at Monodroid.Droidinator.CreateApk () [0x00000] in <filename
unknown>:0
at Monodroid.MainClass.Main (System.String[] argv) [0x00000] in
<filename unknown>:0
D:\SRC\MonoDroid\monodroid-samples\ApiDemo\Resources\drawable\android_button.xml(4):
error 1: No resource found that matches the given name (at
'drawable' with value '@drawable/AndroidPressed').
[D:\SRC\MonoDroid\monodroid-samples\ApiDemo\ApiDemo.csproj]
Done Building Project
"D:\SRC\MonoDroid\monodroid-samples\ApiDemo\ApiDemo.csproj"
(SignAndroidPackage target(s)) -- FAILED.
Build FAILED.
Solution:
1. in
D:\SRC\MonoDroid\monodroid-samples\ApiDemo\Resources\drawable\android_button.xml
changed:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/AndroidPressed"
android:state_pressed="true" />
<item android:drawable="@drawable/android_focused"
android:state_focused="true" />
<item android:drawable="@drawable/android_normal" />
</selector>
to:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/androidpressed"
android:state_pressed="true" />
<item android:drawable="@drawable/android_focused"
android:state_focused="true" />
<item android:drawable="@drawable/android_normal" />
</selector>
2. renamed/moved:
D:\SRC\MonoDroid\monodroid-samples\ApiDemo\Resources\drawable\AndroidPressed.png
to
D:\SRC\MonoDroid\monodroid-samples\ApiDemo\Resources\drawable\androidpressed.png
regards
mel
--
Miljenko Cvjetko dipl.ing. ET
Direktor/CEO
Projektant rjes(enja/Solution Architect
Razvojni programer/Senior developer
Voditelj projekta/Project Manager
IX juz(na obala 13
Kajzerica Zagreb
T: 385 1 7775555
M: 385 91 557 447 3
F: 385 1 7779556
e: [email protected]
w: http://www.holisticware.net
_______________________________________________
Monodroid mailing list
[email protected]
UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid