Visual Studio 2017 - Xamarin - The file “obj\Debug\android\bin\packaged_resources” does not exist

后端 未结 14 1754
自闭症患者
自闭症患者 2021-01-01 11:13

I\'m fighting with that issue for 2 days already and can\'t find any solution.

I have an Xamarin Android app in Visual Studio 2017 consisting of three projects:

相关标签:
14条回答
  • 2021-01-01 11:48

    After following several online suggestions - updating SDK, updating Xamarin etc - none of which worked for me.

    Finally found that I had an activity for a Android provider to Alarm clock in my AndroidManifest file as below

     <activity 
         android:name="com.njcommuter.droid/android.provider.AlarmClock" 
         android:label="AlarmClock"
         .....
         />
    

    Removing this line - and rebuilding worked fine without any errors and was able to deploy solution successfully.

    Note : testing this by putting the line back, and I get same error again on rebuilding. It can be linked to using any android provider which creates the package for it, not necessarily AlarmClock only.

    0 讨论(0)
  • 2021-01-01 11:48

    This error is, somewhat of, a wrapper for what can be multiple reasons that that the file was not created. The key is to look in the detailed output and look for the underlying error causing the file creation failure.

    In my case, I had corrupted icon.png files (generated right from from the VS xamarin nunit template, no less!). Once I put in valid png files, everything was built fine.

    0 讨论(0)
  • 2021-01-01 11:50

    I had the same problem. After removing the dash "-" sign from the image file name, the problem is solved. Bad error message! It should not be:

    The file "obj\Debug\android\bin\packaged_resources" does not exist.

    Writing an error message like this causing the Developer to think about something else while the problem is the illegal file name.

    0 讨论(0)
  • 2021-01-01 11:50

    For me it was Target Android Version.I had it set to

    but changing it to Compiling version(for me it was the latest platform) resolved the issue.

    0 讨论(0)
  • 2021-01-01 11:52

    It just because the Version Code,I set Code by '1.0',The file "obj\Debug\android\bin\packaged_resources" does not exist.;And I set it by '1',everything is ok.

    0 讨论(0)
  • 2021-01-01 11:54

    I had the same problem, and i removed all image file name have "-" character. My problem solved

    0 讨论(0)
提交回复
热议问题