NativeScript: Android - tns run fails with Resources$NotFoundException: Resource ID #0xfffffff6
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 5.0.1
- Cross-platform modules:
- Android Runtime: 5.0.0
- iOS Runtime (if applicable): 5.0.0
- Plugin(s):
Package.json
{
"android": {
"markingMode": "none"
},
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "org.nativescript.xyz",
"tns-ios": {
"version": "5.0.0"
},
"tns-android": {
"version": "5.0.0"
}
},
"dependencies": {
"@angular/animations": "~7.0.0",
"@angular/common": "~7.0.0",
"@angular/compiler": "~7.0.0",
"@angular/core": "~7.0.0",
"@angular/forms": "~7.0.0",
"@angular/http": "~7.0.0",
"@angular/platform-browser": "~7.0.0",
"@angular/platform-browser-dynamic": "~7.0.0",
"@angular/router": "~7.0.0",
"nativescript-algolia": "^1.1.0",
"nativescript-angular": "^7.0.0",
"nativescript-camera": "^4.0.2",
"nativescript-email": "^1.5.3",
"nativescript-filter-select": "^1.2.9",
"nativescript-filterable-listpicker": "^2.2.3",
"nativescript-geolocation": "^4.2.6",
"nativescript-imagepicker": "^6.0.4",
"nativescript-iqkeyboardmanager": "^1.3.0",
"nativescript-ngx-slides": "^6.1.0",
"nativescript-pdf-view": "^2.0.1",
"nativescript-plugin-firebase": "^7.4.2",
"nativescript-social-share": "^1.5.0",
"nativescript-theme-core": "~1.0.4",
"nativescript-toast": "^1.4.6",
"nativescript-ui-listview": "^3.8.0",
"nativescript-web-image-cache": "^4.2.2",
"reflect-metadata": "~0.1.8",
"rxjs": "^6.3.3",
"rxjs-compat": "^6.2.2",
"tns-core-modules": "^5.0.2"
},
"devDependencies": {
"@angular/compiler-cli": "~6.1.0",
"@ngtools/webpack": "~6.2.0",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"codelyzer": "^4.4.4",
"es6-promise-loader": "^1.0.2",
"lazy": "1.0.11",
"nativescript-dev-typescript": "^0.7.3",
"nativescript-dev-webpack": "^0.17.0",
"prettier": "^1.11.1",
"tslint": "^5.1.0",
"typescript": "~3.1.1",
"webpack": "^4.25.1",
"zone.js": "^0.8.26"
},
}
Describe the bug Project runs correctly for IOS. For android run fails with the following error log:
JS: Angular is running in the development mode. Call enableProdMode() to enable the production mode.
JS: firebase.init done
System.err: android.content.res.Resources$NotFoundException: Resource ID #0xfffffff6
System.err: at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:216)
System.err: at android.content.res.Resources.loadXmlResourceParser(Resources.java:2167)
System.err: at android.content.res.Resources.getAnimation(Resources.java:1192)
System.err: at android.view.animation.AnimationUtils.loadAnimation(AnimationUtils.java:137)
System.err: at android.support.v4.app.FragmentManagerImpl.loadAnimation(FragmentManager.java:1073)
System.err: at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1554)
System.err: at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1595)
System.err: at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:758)
System.err: at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2363)
System.err: at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2149)
System.err: at android.support.v4.app.FragmentManagerImpl.optimizeAndExecuteOps(FragmentManager.java:2103)
System.err: at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2013)
System.err: at android.support.v4.app.FragmentManagerImpl$1.run(FragmentManager.java:710)
System.err: at android.os.Handler.handleCallback(Handler.java:873)
System.err: at android.os.Handler.dispatchMessage(Handler.java:99)
System.err: at android.os.Looper.loop(Looper.java:193)
System.err: at android.app.ActivityThread.main(ActivityThread.java:6863)
System.err: at java.lang.reflect.Method.invoke(Native Method)
System.err: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:537)
System.err: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Additional context
Have tried reinstalling nativescript and removing platforms, node modules, hooks and package.lock.json as mentioned here. But I continue to get this error.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 25 (9 by maintainers)
@anuragd7 we reviewed your project and found the reason for the exception. In your app/App_Resources/Android/app.gradle you have the following snippet that downgrades the support library dependencies:
However, with https://github.com/NativeScript/NativeScript/pull/6129 NativeScript 5.0 and all later versions do not support older support library versions any more (any version prior to 26 will throw exception). We are now using and rely on the latest support library version 28.0.0 that contains all fixes from Google and we are only testing NativeScript against it.
Hope this helps.
@manoldonev , @NickIliev - I can confirm that the project runs correctly on android after the suggested fix. Many thanks for your support in helping me figure this out. Appreciate it greatly.
Had DM’d ‘niliev’ but seems that didn’t get through. Anyhow glad that I was able to respond to your message on the community Slack. Hoping for a resolution soon 😃
On Tue, 25 Dec, 2018, 12:44 PM Nick Iliev <notifications@github.com wrote:
@NickIliev - Please take a look here - seems to be the same error