Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

How do I solve this emulator compiler issue?

Hello, I am new to this forum.
I am having issues with running my app from my desktop to my Android tablet.
Attached below is my screenshot that describes the issue.

Anyone is willing to help me out at their convenience.

Regards,
JohnDBCTX

Answers

  • LandLuLandLu Member, Xamarin Team Xamurai

    Normally, we will put the layout xml files into the layout folder and leave the images in the drawable folder:

    I noticed that you want to assign the image view control with an icon image. This image must be located in the drawable folder. But your drawable folder only contains a xml file.
    Try to place an image named icon into this folder as I did above.

  • JohnDBCTXJohnDBCTX Member

    I have tried that, and I have gotten this error message.

    Starting emulator pie_9_0_-api_28 ...
    C:\Program Files (x86)\Android\android-sdk\emulator\emulator.EXE -no-boot-anim -avd pie_9_0
    -api_28 -prop monodroid.avdname=pie_9_0-api_28
    1>------ Build started: Project: FirstXamarinApp001.Android, Configuration: Debug Any CPU ------
    1>C:\Users\johnd\source\repos\FirstXamarinApp001\FirstXamarinApp001.Android\Resources\layout\layoutOne.xml(2): error APT2260: resource drawable/icon (aka com.companyname.firstxamarinapp001:drawable/icon) not found.
    1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Aapt2.targets(161,3): error APT2061: failed linking file resources.
    ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
    ========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
    WARNING: unexpected '-prop' value ('monodroid.avdname=pie_9_0
    -api_28'), only 'qemu.*' properties are supported
    emulator: WARNING: Crash service did not start
    HAX is working and emulator runs in fast virt mode.
    Emulator pie_9_0
    -_api_28 is running.
    Waiting for emulator to be ready...
    emulator: Saving state on exit with session uptime 129137 ms

    In short, what does this mean, and how would I solve this building or compiling error?

    Regards,

    JohnDBCTX

  • LandLuLandLu Member, Xamarin Team Xamurai

    error APT2260: resource drawable/icon (aka com.companyname.firstxamarinapp001:drawable/icon) not found.

    Have you put an image named "icon.png" in the drawable folder?
    Please share your sample project here so that I could help you modify it.

Sign In or Register to comment.