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/13 08:56:37 UTC

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

jiwufeiyang edited a comment on issue #214: cordova 9.0  cordova build --release error  not match this qualifier [MissingDefaultResource]
URL: https://github.com/apache/cordova-plugin-splashscreen/issues/214#issuecomment-491730168
 
 
   # Bug Report
   
   ## Problem
   
   ### What is expected to happen?
   cordova 9.0 cordova build --release
   
   
   ### What does actually happen?
   update Android cordova 9.0 cordova build --release error , but cordova build ok
   
   
   ## Information
   <!-- Include all relevant information that might help understand and reproduce the problem -->
   [wen@localhost chezixiang]$ cordova build --release
   Checking Java JDK and Android SDK versions
   ANDROID_SDK_ROOT=undefined (recommended setting)
   ANDROID_HOME=/home/wen/android-sdk-linux (DEPRECATED)
   Subproject Path: CordovaLib
   Subproject Path: app
   
   > Configure project :app
   WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
   It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
   
   > Task :app:preBuild UP-TO-DATE
   > Task :CordovaLib:preBuild UP-TO-DATE
   > Task :CordovaLib:preReleaseBuild UP-TO-DATE
   > Task :CordovaLib:checkReleaseManifest UP-TO-DATE
   > Task :CordovaLib:processReleaseManifest UP-TO-DATE
   > Task :app:preReleaseBuild UP-TO-DATE
   > Task :CordovaLib:compileReleaseAidl NO-SOURCE
   > Task :app:compileReleaseAidl NO-SOURCE
   > Task :CordovaLib:packageReleaseRenderscript NO-SOURCE
   > Task :app:compileReleaseRenderscript UP-TO-DATE
   > Task :app:checkReleaseManifest UP-TO-DATE
   > Task :app:generateReleaseBuildConfig UP-TO-DATE
   > Task :app:prepareLintJar UP-TO-DATE
   > Task :app:generateReleaseSources UP-TO-DATE
   > Task :CordovaLib:compileReleaseRenderscript UP-TO-DATE
   > Task :CordovaLib:generateReleaseBuildConfig UP-TO-DATE
   > Task :CordovaLib:generateReleaseResValues UP-TO-DATE
   > Task :CordovaLib:generateReleaseResources UP-TO-DATE
   > Task :CordovaLib:packageReleaseResources UP-TO-DATE
   > Task :CordovaLib:generateReleaseRFile UP-TO-DATE
   > Task :CordovaLib:prepareLintJar UP-TO-DATE
   > Task :CordovaLib:generateReleaseSources UP-TO-DATE
   > Task :CordovaLib:javaPreCompileRelease UP-TO-DATE
   > Task :CordovaLib:compileReleaseJavaWithJavac UP-TO-DATE
   > Task :CordovaLib:processReleaseJavaRes NO-SOURCE
   > Task :CordovaLib:transformClassesAndResourcesWithPrepareIntermediateJarsForRelease UP-TO-DATE
   > Task :app:javaPreCompileRelease UP-TO-DATE
   > Task :app:mainApkListPersistenceRelease UP-TO-DATE
   > Task :app:generateReleaseResValues UP-TO-DATE
   > Task :app:generateReleaseResources UP-TO-DATE
   > Task :app:mergeReleaseResources UP-TO-DATE
   > Task :app:createReleaseCompatibleScreenManifests UP-TO-DATE
   > Task :app:processReleaseManifest
   > Task :app:processReleaseResources
   > Task :app:compileReleaseJavaWithJavac UP-TO-DATE
   > Task :app:compileReleaseNdk NO-SOURCE
   > Task :app:compileReleaseSources UP-TO-DATE
   
   > Task :app:lintVitalRelease
   /home/wen/work/cordova/dep/chezixiang/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]
   /home/wen/work/cordova/dep/chezixiang/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]
   /home/wen/work/cordova/dep/chezixiang/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]
   /home/wen/work/cordova/dep/chezixiang/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
   
   > Task :app:mergeReleaseShaders UP-TO-DATE
   > Task :app:compileReleaseShaders UP-TO-DATE
   > Task :app:generateReleaseAssets UP-TO-DATE
   > Task :CordovaLib:mergeReleaseShaders UP-TO-DATE
   > Task :CordovaLib:compileReleaseShaders UP-TO-DATE
   > Task :CordovaLib:generateReleaseAssets UP-TO-DATE
   > Task :CordovaLib:packageReleaseAssets UP-TO-DATE
   > Task :app:mergeReleaseAssets
   > Task :app:signingConfigWriterRelease UP-TO-DATE
   > Task :app:transformClassesWithDexBuilderForRelease UP-TO-DATE
   > Task :app:transformDexArchiveWithExternalLibsDexMergerForRelease UP-TO-DATE
   > Task :app:transformDexArchiveWithDexMergerForRelease UP-TO-DATE
   > Task :app:mergeReleaseJniLibFolders UP-TO-DATE
   > Task :CordovaLib:compileReleaseNdk NO-SOURCE
   > Task :CordovaLib:mergeReleaseJniLibFolders UP-TO-DATE
   > Task :CordovaLib:transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE
   > Task :CordovaLib:transformNativeLibsWithIntermediateJniLibsForRelease UP-TO-DATE
   > Task :app:transformNativeLibsWithMergeJniLibsForRelease UP-TO-DATE
   > Task :app:processReleaseJavaRes NO-SOURCE
   > Task :app:transformResourcesWithMergeJavaResForRelease UP-TO-DATE
   > Task :app:packageRelease
   > Task :app:assembleRelease
   > Task :app:cdvBuildRelease
   
   BUILD SUCCESSFUL in 2s
   42 actionable tasks: 5 executed, 37 up-to-date
   Built the following apk(s): 
   	/home/wen/work/cordova/dep/chezixiang/platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk
   
   
   
   ### Command or Code
   <!-- What command or code is needed to reproduce the problem? -->
   
   config.xml
   
   preference name="Orientation" value="portrait" />
   preference name="SplashScreen" value="screen" />
   preference name="SplashScreenDelay" value="3800" />
   preference name="auto-hide-splash-screen" value="ture" />
   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" />
   /platform>
   
   
   ### Environment, Platform, Device
   <!-- In what environment, on what platform or on which device are you experiencing the issue? -->
   environment : Android
   
   
   ### Version information
   <!-- 
   What are relevant versions you are using?
   For example:
   Cordova: Cordova CLI, Cordova Platforms, Cordova Plugins 
   Other Frameworks: Ionic Framework and CLI version
   Operating System, Android Studio, Xcode etc.
   -->
   
   Cordova version (cordova -v):9.0.0 (cordova-lib@9.0.1)
   
   Cordova platform version (cordova platform ls):
   Installed platforms:
   android 8.0.0
   
   $cordova plugin list
   cordova-open 1.0.12 "Open"
   cordova-plugin-alipay-v2 1.0.0 "alipay"
   cordova-plugin-app-version 0.1.9 "AppVersion"
   cordova-plugin-camera 4.0.3 "Camera"
   cordova-plugin-device 2.0.2 "Device"
   cordova-plugin-dialogs 2.0.1 "Notification"
   cordova-plugin-file 6.0.1 "File"
   cordova-plugin-file-transfer 1.7.1 "File Transfer"
   cordova-plugin-inappbrowser 3.0.0 "InAppBrowser"
   cordova-plugin-jcore 1.2.8 "JCore"
   cordova-plugin-media 5.0.2 "Media"
   cordova-plugin-network-information 2.0.1 "Network Information"
   cordova-plugin-progressdialog 2.0.1 "XYDialog"
   cordova-plugin-splashscreen 5.0.2 "Splashscreen"
   cordova-plugin-wechat 2.8.0 "Wechat"
   cordova-plugin-whitelist 1.3.3 "Whitelist"
   jpush-phonegap-plugin 3.6.4 "JPush"
   
   
   Other Frameworks: Eclipse edit,   Teminal  build
   ## 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