Android App Compile Not Generating Package Resources

前端 未结 22 2047
借酒劲吻你
借酒劲吻你 2020-12-16 09:02

When attempting to compile my Xamarin.Android app I get the compile error:

Error 3 The file \"obj\\Debug\\android\\bin\\packaged_resources\" does no

相关标签:
22条回答
  • 2020-12-16 09:48

    Encountered same issue in VS 2015 and Xamarin 7.2.0.7. In my case, the issue happened just suddenly, and turned out the issue caused by wrong element name in axml, traced using Tiago's answers above.

    So I didn't find the line Tiago mentioned with aapt.exe, but I then I tried to search for keyword failed in output. Then I found one telling me about margin. In android, margin is set using android:layout_margin. I played with element and forgot and put android:margin instead, thus also why it happened so sudden after so many successful run. Fixed it and the build succeeded.

    0 讨论(0)
  • 2020-12-16 09:49

    Firstly, i suggest you change "show out put from" Build to Xamarin to see the real error and its details as seen in my case

    At first

    And then please make sure you installed your NDK properly. That was the issue with mine,

    and please make sure the NDK directory is also set

    hope this helps someone

    0 讨论(0)
  • 2020-12-16 09:51

    I´ve had the same issue.

    Then i´ve reviewed my resource file names.

    Solution:

    One file was using "-" in it´s name. (invalid character)

    Then i replaced for "_" (underline).

    PS:

    => file name: must contain only [a-z0-9_.]

    0 讨论(0)
  • 2020-12-16 09:51

    Using Xamarin Studio here -

    Sometimes this is caused by AXML errors.

    Which if you turn on detailed / diagnostic in preferences you can search the build output (or your packaging output) for the word ERROR.

    For example, somebody checked in some AXML line(s) with -

    android:Text="something"

    and the uppercase T was causing this error -

    Resources/layout/Somefile.axml(11): error APT0000: No resource identifier found for attribute 'Text' in package 'android'

    Fixing the errors fixed the original message.

    0 讨论(0)
  • 2020-12-16 09:53

    Follow the steps below to identify the problem:

    1 - In Visual Studio: Tools> Options> Projects and solutions> Build and Run.

    1.1 - In the dropdown: MSBuild project build output verbosity:> Diagnostic.

    1.2 - Close the dialog box.

    2 - View> Output (Ctrl + W, O).

    3 - Run the build or rebuild.

    In the output find the line:

    C:\Program Files (x86)\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(1665,3): error MSB6006: "aapt.exe" exited with code 1.

    What is just above this error is what caused the error.

    0 讨论(0)
  • 2020-12-16 09:53

    i also found that removing the packages in Tools/Preview Channel and Android N AND ALSO Android SDK Build Tools rev 24, done a build and worked.. This is a complete new portable project/android/ios

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