locked
How to place images into the Resource/drawable directory in Xamarin Studio , make it seen in codes ? RRS feed

  • Question

  • User149770 posted

    I have searched but every solution starts from second step; after you put image into drawable or other mipmap.. folders.

    My problem is Drag and drop is not working on Xamarin Studio project and then I copy my image directly to the Drawable folder With Autocomple in any layout my image name is visible even after *restarting *the Xamarin Studio I can not reach the name of my image also cant see under the drawable folders.

    [Activity (Label = "NYDMezura", MainLauncher = true, Icon = "@mipmap/icon")] [Activity (Label = "NYDMezura", MainLauncher = true, Icon = "@drawable/nameOfImage")] is not working () changin the Aplication icon on AndroidManifest
    also in any layout source I cant see the @drawable/nameOfImage" (image below) What is tha right way of placing image into project, with right click on drawable folders (image below) or copying the images into drawable folders? is the size of my images are matter or what do I miss in this progress? any help would be apriciated Note: I put png image files

    the closest topics to my problem https://forums.xamarin.com/discussion/19165/new-to-android-adding-images-to-resources-drawable https://developer.xamarin.com/guides/xamarin-forms/working-with/images/ http://forums.xamarin.com/discussion/59030/how-to-set-image-ios-android-windows-i-am-new-to-xamarin-forms

    Thursday, February 11, 2016 1:51 PM

All replies

  • User65389 posted

    @SamirSamedov: You have sent me a PM, and asked, if I can have a look at this posting (what I have done now :smile:). First, if you have such a wish, you should mention the user in the message (like I have mentioned you in this posting :smirk: ). This has the same effect.

    Second, I had the problems with Visual Studio (not Xamarin Studio) some time ago.
    I then have wrote a .pdf for other users, that describes the problem in detail.

    You can find it in this thread: http://forums.xamarin.com/discussion/26511/adding-png-to-resources-drawable-hangs-visual-studio/p1

    But - as I wrote - this is for VS and not XS. As I don't work with XS, I also cannot say something to the problem in XS.

    Thursday, February 11, 2016 2:28 PM
  • User149770 posted

    Thanks @FreadyWenger next time I will do that way, keep searching for solution what I need , Could you please let me know VS or Xs is more usefull, handy in your opinion. Having too much errorrs mistakes compared with Android ides.

    Thursday, February 11, 2016 3:36 PM
  • User65389 posted

    @SamirSamedov yes - you have (tried to :smirk:) mention(ed) me now :smile:
    As my username is fredywenger (not freadyWenger), I have received a notification as I have posted in this thread (not of cause you have mentioned me :smirk: ). If you want to mention another user, type in the "@" and then type in slowly the username (then some kind of "intellisese" take place and you can catch the correct user from the showed list).

    To your question: As I'm a .NET developer (various other C/S Windows projects and also Web-Application) it's no question for me (-> VS). Further, if you want to develop also for the Windows-Platform (WP, UWP) with Xamarin(.Forms), you have to take VS instead of XF. Unfortunately, there were incredible, time consuming and annoying problems with the Xamarin Integrations-SW and VS2013 in the past (especially also with the MAC integration) . Since a while, there is a brand-new version to the MAC-Integration available that should be a lot more stable (but I don't have used it yet, as my apps - fortunately - are in store since a while already). Also some things have changed with VS2015 (but I also don't have used it yet). You also have to decide, if you want to develop for all platforms (then you have to use Xamarin.Forms) or if you want to develop only for one platform (e.g. Android), then you can use Xamarin.Android or Xamarin.iOS. I cannot say, how VS compares to XS (regarding bugs / problems) as I never have worked with XS (and also don't want to). But I'm sure, some other users here can say something to it...

    I think, my starter-guide should be usable for you: http://forums.xamarin.com/discussion/36821/quickstart-guide-to-start-developing-with-xamarin-forms#latest

    And you can find more documents, if you click my profile...

    Hope this helps you a bit :sunglasses:
    Greetings from Switzerland

    Thursday, February 11, 2016 4:04 PM
  • User271583 posted

    I try to add png file to drawable folder, error out, looking for solution

    Thursday, November 3, 2016 5:38 PM
  • User12211 posted

    @binzeng said: I try to add png file to drawable folder, error out, looking for solution

    Can you share the error or do you want us to guess? :wink:

    Thursday, November 3, 2016 6:06 PM
  • User271583 posted

    i think everyone have the same error. No resource found that matches the given name ....

    Thursday, November 3, 2016 6:08 PM
  • User271583 posted
    Target _UpdateAndroidResgen:
          Processing: obj/Debug/res/layout/main.xml
          Processing: obj/Debug/res/values/strings.xml
        Tool /Users/bzeng/Library/Developer/Xamarin/android-sdk-macosx/build-tools/23.0.2/aapt execution started with arguments: package -f -m -M /var/folders/_z/7lhfjwz533l2gkx1lrnnj6lw0000gq/T/aac03l53.uer/manifest/AndroidManifest.xml -J /var/folders/_z/7lhfjwz533l2gkx1lrnnj6lw0000gq/T/aac03l53.uer --custom-package com.costco.costcoxamarin -F /var/folders/_z/7lhfjwz533l2gkx1lrnnj6lw0000gq/T/aac03l53.uer/resources.apk.bk -S obj/Debug/res/ -I /Users/bzeng/Library/Developer/Xamarin/android-sdk-macosx/platforms/android-23/android.jar --auto-add-overlay 
        libpng error: Not a PNG file
        ERROR: Failure processing PNG image obj/Debug/res/drawable/test1.png
    

    Resources/layout/Main.axml(2): error APT0000: No resource found that matches the given name (at 'src' with value '@drawable/test1').

    Task "Aapt" execution -- FAILED
    Done building target "_UpdateAndroidResgen" in project "/Users/bzeng/Projects/CostcoXamarin/Droid/CostcoXamarin.Droid.csproj".-- FAILED
    

    Done building project "/Users/bzeng/Projects/CostcoXamarin/Droid/CostcoXamarin.Droid.csproj".-- FAILED

    Build FAILED. Errors:

    /Users/bzeng/Projects/CostcoXamarin/Droid/CostcoXamarin.Droid.csproj (Build) -> /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets (_UpdateAndroidResgen target) ->

    Resources/layout/Main.axml(2): error APT0000: No resource found that matches the given name (at 'src' with value '@drawable/test1').
    
     0 Warning(s)
     1 Error(s)
    
    Thursday, November 3, 2016 6:10 PM
  • User12211 posted

    @binzeng said: i think everyone have the same error. No resource found that matches the given name ....

    Since no error message was mentioned anywhere in this thread, I thought it was a reasonable question.

    Your log output says "libpng error: Not a PNG file". That implies that your file is not actually a png file, but might be something else (like a jpg file) with a .png extension.

    Thursday, November 3, 2016 6:47 PM
  • User271583 posted

    still error out say: file not found i did copy the file to xhdpi, xxhdpi, xxxhdpi

    Thursday, November 3, 2016 8:55 PM
  • User271583 posted

    now, I removed my ImageView, just leave original button, still give me run time error: can't find icon.

    Are you sure, It is working studio?

    Thursday, November 3, 2016 9:13 PM
  • User12211 posted

    The not found error is a result of the earlier error I mentioned: libpng error: Not a PNG file

    Until that is resolved, you will continue to get not found errors.

    Friday, November 4, 2016 3:55 PM
  • User271583 posted

    Android.Content.Res.Resources+NotFoundException: File res/mipmap-xxhdpi-v4/iclauncher.png from xml type layout resource ID #0x7f030000 ---> Java.IO.FileNotFoundException: Corrupt XML binary file at java.io.FileNotFoundException: Corrupt XML binary file at at android.content.res.AssetManager.openXmlAssetNative(Native Method) at at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:485) at at android.content.res.Resources.loadXmlResourceParser(Resources.java:2803) at at android.content.res.Resources.loadXmlResourceParser(Resources.java:2776) at at android.content.res.Resources.getLayout(Resources.java:1165) at at android.view.LayoutInflater.inflate(LayoutInflater.java:421) at at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393) at at android.app.Activity.setContentView(Activity.java:2172) at at md558e0eb82b451ee454b862bb201b4e26c.MainActivity.nonCreate(Native Method) at at md558e0eb82b451ee454b862bb201b4e26c.MainActivity.onCreate(MainActivity.java:29) at at android.app.Activity.performCreate(Activity.java:6251) at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) at at android.app.ActivityThread.-wrap11(ActivityThread.java) at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at at android.os.Handler.dispatchMessage(Handler.java:102) at at android.os.Looper.loop(Looper.java:148) at at android.app.ActivityThread.main(ActivityThread.java:5417) at at java.lang.reflect.Method.invoke(Native Method) at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) --- End of inner exception stack trace --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3511/f4db8a57/source/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x000a7] in /Users/builder/data/lanes/3511/0e59c362/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:12083 at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00068] in /Users/builder/data/lanes/3511/0e59c362/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethodsInvoke.cs:31 at Android.App.Activity.SetContentView (System.Int32 layoutResID) [0x00017] in /Users/builder/data/lanes/3511/0e59c362/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.App.Activity.cs:4940 at CostcoXamarin.Droid.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x00015] in <74ad60f3dba3460c83bfdc1e15f8fb7d>:0 at Android.App.Activity.nOnCreateLandroidosBundle (System.IntPtr jnienv, System.IntPtr native_this, System.IntPtr nativesavedInstanceState) [0x00011] in /Users/builder/data/lanes/3511/0e59c362/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.App.Activity.cs:2426 at at (wrapper dynamic-method) System.Object:25beddd5-5aa0-4d00-8136-04092f783412 (intptr,intptr,intptr) at android.content.res.Resources$NotFoundException: File res/mipmap-xxhdpi-v4/iclauncher.png from xml type layout resource ID #0x7f030000 at at android.content.res.Resources.loadXmlResourceParser(Resources.java:2821) at at android.content.res.Resources.loadXmlResourceParser(Resources.java:2776) at at android.content.res.Resources.getLayout(Resources.java:1165) at at android.view.LayoutInflater.inflate(LayoutInflater.java:421) at at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393) at at android.app.Activity.setContentView(Activity.java:2172) at at md558e0eb82b451ee454b862bb201b4e26c.MainActivity.nonCreate(Native Method) at at md558e0eb82b451ee454b862bb201b4e26c.MainActivity.onCreate(MainActivity.java:29) at at android.app.Activity.performCreate(Activity.java:6251) at at android.app.Instrumentation.callActivityOnCreate(Inst rumentation.java:1107) at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) at at android.app.ActivityThread.-wrap11(ActivityThread.java) at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at at android.os.Handler.dispatchMessage(Handler.java:102) at at android.os.Looper.loop(Looper.java:148) at at android.app.ActivityThread.main(ActivityThread.java:5417) at at java.lang.reflect.Method.invoke(Native Method) at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at Caused by: java.io.FileNotFoundException: Corrupt XML binary file at at android.content.res.AssetManager.openXmlAssetNative(Native Method) at at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:485) at at android.content.res.Resources.loadXmlResourceParser(Resources.java:2803) at ... 20 more

    I do have such folder called : mipmap-xxhdpi-v4. i did copy the png file jto xxhdpi........

    Monday, November 7, 2016 12:45 PM
  • User271583 posted

    Android.Content.Res.Resources+NotFoundException: File res/mipmap-xxhdpi-v4/iclauncher.png from xml type layout resource ID #0x7f030000 ---> Java.IO.FileNotFoundException: Corrupt XML binary file at java.io.FileNotFoundException: Corrupt XML binary file at at android.content.res.AssetManager.openXmlAssetNative(Native Method) at at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:485) at at android.content.res.Resources.loadXmlResourceParser(Resources.java:2803) at at android.content.res.Resources.loadXmlResourceParser(Resources.java:2776) at at android.content.res.Resources.getLayout(Resources.java:1165) at at android.view.LayoutInflater.inflate(LayoutInflater.java:421) at at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393) at at android.app.Activity.setContentView(Activity.java:2172) at at md558e0eb82b451ee454b862bb201b4e26c.MainActivity.nonCreate(Native Method) at at md558e0eb82b451ee454b862bb201b4e26c.MainActivity.onCreate(MainActivity.java:29) at at android.app.Activity.performCreate(Activity.java:6251) at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) at at android.app.ActivityThread.-wrap11(ActivityThread.java) at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at at android.os.Handler.dispatchMessage(Handler.java:102) at at android.os.Looper.loop(Looper.java:148) at at android.app.ActivityThread.main(ActivityThread.java:5417) at at java.lang.reflect.Method.invoke(Native Method) at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) --- End of inner exception stack trace --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3511/f4db8a57/source/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x000a7] in /Users/builder/data/lanes/3511/0e59c362/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:12083 at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00068] in /Users/builder/data/lanes/3511/0e59c362/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethodsInvoke.cs:31 at Android.App.Activity.SetContentView (System.Int32 layoutResID) [0x00017] in /Users/builder/data/lanes/3511/0e59c362/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.App.Activity.cs:4940 at CostcoXamarin.Droid.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x00015] in <74ad60f3dba3460c83bfdc1e15f8fb7d>:0 at Android.App.Activity.nOnCreateLandroidosBundle (System.IntPtr jnienv, System.IntPtr native_this, System.IntPtr nativesavedInstanceState) [0x00011] in /Users/builder/data/lanes/3511/0e59c362/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.App.Activity.cs:2426 at at (wrapper dynamic-method) System.Object:25beddd5-5aa0-4d00-8136-04092f783412 (intptr,intptr,intptr) at android.content.res.Resources$NotFoundException: File res/mipmap-xxhdpi-v4/iclauncher.png from xml type layout resource ID #0x7f030000 at at android.content.res.Resources.loadXmlResourceParser(Resources.java:2821) at at android.content.res.Resources.loadXmlResourceParser(Resources.java:2776) at at android.content.res.Resources.getLayout(Resources.java:1165) at at android.view.LayoutInflater.inflate(LayoutInflater.java:421) at at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393) at at android.app.Activity.setContentView(Activity.java:2172) at at md558e0eb82b451ee454b862bb201b4e26c.MainActivity.nonCreate(Native Method) at at md558e0eb82b451ee454b862bb201b4e26c.MainActivity.onCreate(MainActivity.java:29) at at android.app.Activity.performCreate(Activity.java:6251) at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) at at android.app.ActivityThread.-wrap11(ActivityThread.java) at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at at android.os.Handler.dispatchMessage(Handler.java:102) at at android.os.Looper.loop(Looper.java:148) at at android.app.ActivityThread.main(ActivityThread.java:5417) at at java.lang.reflect.Method.invoke(Native Method) at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at Caused by: java.io.FileNotFoundException: Corrupt XML binary file at at android.content.res.AssetManager.openXmlAssetNative(Native Method) at at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:485) at at android.content.res.Resources.loadXmlResourceParser(Resources.java:2803) at ... 20 more

    I do have such folder called : mipmap-xxhdpi-v4. i did copy

    Monday, November 7, 2016 12:45 PM
  • User271583 posted

    Android.Content.Res.Resources+NotFoundException: File res/mipmap-xxhdpi-v4/iclauncher.png from xml type layout resource ID #0x7f030000 ---> Java.IO.FileNotFoundException: Corrupt XML binary file at java.io.FileNotFoundException: Corrupt XML binary file at at android.content.res.AssetManager.openXmlAssetNative(Native Method) at at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:485) at at android.content.res.Resources.loadXmlResourceParser(Resources.java:2803) at at android.content.res.Resources.loadXmlResourceParser(Resources.java:2776) at at android.content.res.Resources.getLayout(Resources.java:1165) at at android.view.LayoutInflater.inflate(LayoutInflater.java:421) at at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393) at at android.app.Activity.setContentView(Activity.java:2172) at at md558e0eb82b451ee454b862bb201b4e26c.MainActivity.nonCreate(Native Method) at at md558e0eb82b451ee454b862bb201b4e26c.MainActivity.onCreate(MainActivity.java:29) at at android.app.Activity.performCreate(Activity.java:6251) at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) at at android.app.ActivityThread.-wrap11(ActivityThread.java) at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at at android.os.Handler.dispatchMessage(Handler.java:102) at at android.os.Looper.loop(Looper.java:148) at at android.app.ActivityThread.main(ActivityThread.java:5417) at at java.lang.reflect.Method.invoke(Native Method) at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) --- End of inner exception stack trace --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in /Users/builder/data/lanes/3511/f4db8a57/source/mono/mcs/class/referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs:143 at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x000a7] in /Users/builder/data/lanes/3511/0e59c362/source/Java.Interop/src/Java.Interop/Java.Interop/JniEnvironment.g.cs:12083 at Java.Interop.JniPeerMembers+JniInstanceMethods.InvokeVirtualVoidMethod (System.String encodedMember, Java.Interop.IJavaPeerable self, Java.Interop.JniArgumentValue* parameters) [0x00068] in /Users/builder/data/lanes/3511/0e59c362/source/Java.Interop/src/Java.Interop/Java.Interop/JniPeerMembers.JniInstanceMethodsInvoke.cs:31 at Android.App.Activity.SetContentView (System.Int32 layoutResID) [0x00017] in /Users/builder/data/lanes/3511/0e59c362/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.App.Activity.cs:4940 at CostcoXamarin.Droid.MainActivity.OnCreate (Android.OS.Bundle savedInstanceState) [0x00015] in <74ad60f3dba3460c83bfdc1e15f8fb7d>:0 at Android.App.Activity.nOnCreateLandroidosBundle (System.IntPtr jnienv, System.IntPtr native_this, System.IntPtr nativesavedInstanceState) [0x00011] in /Users/builder/data/lanes/3511/0e59c362/source/monodroid/src/Mono.Android/platforms/android-23/src/generated/Android.App.Activity.cs:2426 at at (wrapper dynamic-method) System.Object:25beddd5-5aa0-4d00-8136-04092f783412 (intptr,intptr,intptr) at android.content.res.Resources$NotFoundException: File res/mipmap-xxhdpi-v4/iclauncher.png from xml type layout resource ID #0x7f030000 at at android.content.res.Resources.loadXmlResourceParser(Resources.java:2821) at at android.content.res.Resources.loadXmlResourceParser(Resources.java:2776) at at android.content.res.Resources.getLayout(Resources.java:1165) at at android.view.LayoutInflater.inflate(LayoutInflater.java:421) at at android.view.LayoutInflater.inflate(LayoutInflater.java:374) at at com.android.internal.policy.PhoneWindow.setContentView(PhoneWindow.java:393) at at android.app.Activity.setContentView(Activity.java:2172) at at md558e0eb82b451ee454b862bb201b4e26c.MainActivity.nonCreate(Native Method) at at md558e0eb82b451ee454b862bb201b4e26c.MainActivity.onCreate(MainActivity.java:29) at at android.app.Activity.performCreate(Activity.java:6251) at at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107) at at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369) at at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476) at at android.app.ActivityThread.-wrap11(ActivityThread.java) at at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344) at at android.os.Handler.dispatchMessage(Handler.java:102) at at android.os.Looper.loop(Looper.java:148) at at android.app.ActivityThread.main(ActivityThread.java:5417) at at java.lang.reflect.Method.invoke(Native Method) at at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726) at at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616) at Caused by: java.io.FileNotFoundException: Corrupt XML binary file at at android.content.res.AssetManager.openXmlAssetNative(Native Method) at at android.content.res.AssetManager.openXmlBlockAsset(AssetManager.java:485) at at android.content.res.Resources.loadXmlResourceParser(Resources.java:2803) at ... 20 more

    I do have such folder called : mipmap-xxhdpi-v4. i did copy

    Monday, November 7, 2016 12:45 PM
  • User171503 posted

    I had a similar error occur for me, my problem was being caused by my image name, for android you are only allowed to have [a-z] [0-9] _ . I had other characters and they caused me a lot of problems

    Monday, November 21, 2016 10:33 AM
  • User305975 posted

    Copy the drawable folders with the .pngs In visual studio, paste into the resources folder Done.

    You are copying folders and not individual files hence the inconvenience. Couldn't really call it a bug but its annoying just as much._

    Wednesday, March 8, 2017 1:39 AM