You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by "Sergey Shakhnazarov (JIRA)" <ji...@apache.org> on 2016/03/15 09:24:33 UTC
[jira] [Resolved] (CB-8513) Load resource from wrong package
[ https://issues.apache.org/jira/browse/CB-8513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Shakhnazarov resolved CB-8513.
-------------------------------------
Resolution: Duplicate
> Load resource from wrong package
> --------------------------------
>
> Key: CB-8513
> URL: https://issues.apache.org/jira/browse/CB-8513
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 3.5.0
> Reporter: Van Dev
> Priority: Minor
>
> In CordovaActivity.java (line 351) and CordovaPreferences.java (line 133), both use the following to get the splash screen:
> getResources().getIdentifier(splash, "drawable", getClass().getPackage().getName());
> But in some apps, the class package name does't have to match what you define in the AndroidManifest.xml. It won't load the resource.
> So it should be fixed like following, which is how the ConfigXmlParser load the xml config:
> this.splashscreen = getResources().getIdentifier(splash, "drawable", getClass().getPackage().getName());;
>
> if (this.splashscreen == 0) {
> // reload by the package name defined in AndroidManifest.xml
> this.splashscreen = getResources().getIdentifier(splash, "drawable", this.getPackageName());
> }
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org