You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/05/11 07:38:06 UTC

[GitHub] [cordova-plugin-splashscreen] jiwufeiyang opened a new issue #214: cordova 9.0 cordova build --release error not match this qualifier [MissingDefaultResource]

jiwufeiyang opened a new issue #214: cordova 9.0  cordova build --release error  not match this qualifier [MissingDefaultResource]
URL: https://github.com/apache/cordova-plugin-splashscreen/issues/214
 
 
   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   
   > Task :app:lintVitalRelease
   /platforms/android/app/src/main/res/drawable-port-hdpi/screen.9.png: Error: The drawable "screen" in drawable-port-hdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
   /platforms/android/app/src/main/res/drawable-port-ldpi/screen.9.png: Error: The drawable "screen" in drawable-port-ldpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
   /platforms/android/app/src/main/res/drawable-port-mdpi/screen.9.png: Error: The drawable "screen" in drawable-port-mdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
   /platforms/android/app/src/main/res/drawable-port-xhdpi/screen.9.png: Error: The drawable "screen" in drawable-port-xhdpi has no declaration in the base drawable folder or in a drawable-densitydpi folder; this can lead to crashes when the drawable is queried in a configuration that does not match this qualifier [MissingDefaultResource]
   
      Explanation for issues of type "MissingDefaultResource":
      If a resource is only defined in folders with qualifiers like -land or -en,
      and there is no default declaration in the base folder (layout or values
      etc), then the app will crash if that resource is accessed on a device
      where the device is in a configuration missing the given qualifier.
   
      As a special case, drawables do not have to be specified in the base
      folder; if there is a match in a density folder (such as drawable-mdpi)
      that image will be used and scaled. Note however that if you  only specify
      a drawable in a folder like drawable-en-hdpi, the app will crash in
      non-English locales.
   
      There may be scenarios where you have a resource, such as a -fr drawable,
      which is only referenced from some other resource with the same qualifiers
      (such as a -fr style), which itself has safe fallbacks. However, this still
      makes it possible for somebody to accidentally reference the drawable and
      crash, so it is safer to create a default dummy fallback in the base
      folder. Alternatively, you can suppress the issue by adding
      tools:ignore="MissingDefaultResource" on the element.
   
      (This scenario frequently happens with string translations, where you might
      delete code and the corresponding resources, but forget to delete a
      translation. There is a dedicated issue id for that scenario, with the id
      ExtraTranslation.)
   
   4 errors, 0 warnings
   
   
   ### What does actually happen?
   update Android cordova 9.0 cordova build --release error , but cordova build ok
   
   config.xml
   
    <platform name="android">
           <allow-intent href="market:*" />
           <icon density="ldpi" src="res/android/ldpi.png" />
           <icon density="mdpi" src="res/android/mdpi.png" />
           <icon density="hdpi" src="res/android/hdpi.png" />
           <icon density="xhdpi" src="res/android/xhdpi.png" />
           <splash density="port-ldpi" src="res/screen/android/splash-port-ldpi.9.png" />
           <splash density="port-mdpi" src="res/screen/android/splash-port-mdpi.9.png" />
           <splash density="port-hdpi" src="res/screen/android/splash-port-hdpi.9.png" />
           <splash density="port-xhdpi" src="res/screen/android/splash-port-xhdpi.9.png" />
           <config-file parent="/manifest" target="AndroidManifest.xml" xmlns:android="http://schemas.android.com/apk/res/android">
               <uses-permission android:name="android.permission.REQUEST_INSTALL_PACKAGES" />
               <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
               <uses-permission android:name="android.permission.INTERNET" />
           </config-file>
       </platform>
   
   ## Checklist
   <!-- Please check the boxes by putting an x in the [ ] like so: [x] -->
   
   - [ ] I searched for existing GitHub issues
   - [ ] I updated all Cordova tooling to most recent version
   - [ ] I included all the necessary information above
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org