Hi
I'm getting this error when build for Android:
/Users/akira/dev/nativescript/GuarulhosTEM/GuarulhosTEM/platforms/android/build/intermediates/manifests/full/F0F1F2F3/release/AndroidManifest.xml:32:28-57: AAPT: No resource found that matches the given name (at 'label' with value '@string/title_activity_kimera').
I tried to clean node_modules and platform to rebuild, but this error continues.
Seeing my strings.xml, title_activity_kimera is missing, but in all build attempts, the string continues missing
Here is the crash point:
:mergeF0F1F2F3ReleaseResources
:processF0F1F2F3ReleaseManifest
:processF0F1F2F3ReleaseResources
/Users/akira/dev/nativescript/GuarulhosTEM/GuarulhosTEM/platforms/android/build/intermediates/manifests/full/F0F1F2F3/release/AndroidManifest.xml:32:28-57: AAPT: No resource found that matches the given name (at 'label' with value '@string/title_activity_kimera').
:processF0F1F2F3ReleaseResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processF0F1F2F3ReleaseResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/local/Cellar/android-sdk/24.4.1_1/build-tools/25.0.2/aapt'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
My package.json:
{
"name": "GuarulhosTEM",
"version": "1.0.0",
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"nativescript": {
"id": "br.com.guarulhostem",
"tns-android": {
"version": "2.5.0"
},
"tns-ios": {
"version": "2.5.0"
}
},
"dependencies": {
"@angular/common": "2.4.3",
"@angular/compiler": "2.4.3",
"@angular/core": "2.4.3",
"@angular/forms": "2.4.3",
"@angular/http": "2.4.3",
"@angular/platform-browser": "2.4.3",
"@angular/platform-browser-dynamic": "2.4.3",
"@angular/router": "3.4.3",
"nativescript-angular": "1.4.0",
"nativescript-angular-snapshot": "1.4.0-5.5.372.32-1",
"nativescript-cardview": "1.3.0",
"nativescript-i18n": "0.1.5",
"nativescript-loading-indicator": "2.0.1",
"nativescript-localstorage": "1.1.0",
"nativescript-ng2-fonticon": "1.3.4",
"nativescript-telerik-ui": "1.6.0",
"nativescript-template-drawer-ts": "1.3.1",
"nativescript-theme-core": "1.0.2",
"nativescript-toast": "1.4.5",
"nativescript-videoplayer": "2.4.0",
"reflect-metadata": "0.1.8",
"rxjs": "5.0.1",
"tns-core-modules": "^2.5.2"
},
"devDependencies": {
"babel-traverse": "6.8.0",
"babel-types": "6.8.1",
"babylon": "6.8.0",
"codelyzer": "0.0.28",
"lazy": "1.0.11",
"nativescript-dev-typescript": "0.3.5",
"tslint": "3.14.0",
"typescript": "2.2.0",
"zone.js": "0.7.2",
"nativescript-dev-android-snapshot": "0.0.6"
}
}
Thanks if someome can help me to resolve this problem
@LeandroTakagi somehow you are missing an Android string resource which is used by the starting template and created by the NativeScript CLI. The solution is to either restore this string value or remove the references to it.
Below are the steps needed to restore it:
<resources>
<string name="title_activity_kimera">MyAppTitle</string>
</resources>
repeat the above steps for _app/App_Resources/Android/values-v21_
remove platforms folder and rebuild the application.
Solved. Thank you
This solution didn't worked as exposed, but it pointed me to the right direction after struggling with nativescrip-ui-dataform plugin (buggy?). Because some strange errors I finally did a tns update, and then the error of this type happened (title_activity_kimera).
Here is how I solved it:
1.- yes, the title_activity_kimera was missing, but the app/App_Resources/Android/values/strings.xml file was not being used. Instead, another file in app/App_Resources/Android/src/main/res/values/strings.xml
2.-I found that such new file was plenty of strings I set for nativescript-localize plugin (i18n) that requires one or more JSON files in app/i18n like en.default.json to exist to do dynamical replacement based on language.
3.-I set the title_activity_kimera string at that file as any other term I want to translate and rebuild using tns run android
This is not a solution, but I wonder what other files can be missing because overwrittes like this one.
Most helpful comment
@LeandroTakagi somehow you are missing an Android string resource which is used by the starting template and created by the NativeScript CLI. The solution is to either restore this string value or remove the references to it.
Below are the steps needed to restore it:
repeat the above steps for _app/App_Resources/Android/values-v21_
remove platforms folder and rebuild the application.