Build failed with message "processF0F1DebugResources FAILED"


#1

I’m trying to build this template for android, which I haven’t modified yet. But the build fails with this message:

Searching for devices...
Executing before-liveSync hook from C:\repos\rolagroup-frontend\hooks\before-liveSync\nativescript-angular-sync.js
Skipping prepare.
Building project...
> Configuring > 0/3 projects > root project
:config phase:  createDefaultIncludeFiles
        +found plugins: nativescript-social-login
        +found plugins: tns-core-modules-widgets

:config phase:  createPluginsConfigFile
         Creating product flavors include.gradle file in C:\repos\rolagroup-frontend\platforms\android/configurations folder...

:config phase:  pluginExtend
        +applying configuration from: C:\repos\rolagroup-frontend\platforms\android\configurations\include.gradle
        +applying configuration from: C:\repos\rolagroup-frontend\platforms\android\configurations\nativescript-social-login\include.gradle
        +applying configuration from: C:\repos\rolagroup-frontend\platforms\android\configurations\tns-core-modules-widgets\include.gradle
> Configuring > 0/3 projects > root project
 :config phase:  addAarDependencies
        +adding dependency: C:\repos\rolagroup-frontend\platforms\android\libs\aar\widgets-release.aar
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
Incremental java compilation is an incubating feature.
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_cogdyo42bssvgewop3zivk6w6.run(C:\repos\rolagroup-frontend\platforms\android\build-tools\android-static-binding-generator\build.gradle:126)
:preBuild UP-TO-DATE
:preF0F1DebugBuild UP-TO-DATE
:checkF0F1DebugManifest
:preF0F1ReleaseBuild UP-TO-DATE
:prepareComAndroidSupportAnimatedVectorDrawable2531Library UP-TO-DATE
:prepareComAndroidSupportAppcompatV72531Library UP-TO-DATE
:prepareComAndroidSupportDesign2531Library UP-TO-DATE
:prepareComAndroidSupportRecyclerviewV72531Library UP-TO-DATE
:prepareComAndroidSupportSupportCompat2531Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUi2531Library UP-TO-DATE
:prepareComAndroidSupportSupportCoreUtils2531Library UP-TO-DATE
:prepareComAndroidSupportSupportFragment2531Library UP-TO-DATE
:prepareComAndroidSupportSupportMediaCompat2531Library UP-TO-DATE
:prepareComAndroidSupportSupportV42531Library UP-TO-DATE
:prepareComAndroidSupportSupportVectorDrawable2531Library UP-TO-DATE
:prepareComAndroidSupportTransition2531Library UP-TO-DATE
:prepareComDigitsSdkAndroidDigits1103Library UP-TO-DATE
:prepareComFacebookAndroidFacebookAndroidSdk460Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesAuth840Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBase840Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBasement840Library UP-TO-DATE
:prepareComTwitterSdkAndroidTweetComposer104Library UP-TO-DATE
:prepareComTwitterSdkAndroidTweetUi1102Library UP-TO-DATE
:prepareComTwitterSdkAndroidTwitter1132Library UP-TO-DATE
:prepareComTwitterSdkAndroidTwitterCore167Library UP-TO-DATE
:prepareIoFabricSdkAndroidFabric1311Library UP-TO-DATE
:prepareRolagroupfrontendRuntimeUnspecifiedLibrary UP-TO-DATE
:prepareWidgetsReleaseLibrary UP-TO-DATE
:prepareF0F1DebugDependencies
:compileF0F1DebugAidl UP-TO-DATE
:compileF0F1DebugRenderscript UP-TO-DATE
:generateF0F1DebugBuildConfig UP-TO-DATE
:cleanLocalAarFiles
:ensureMetadataOutDir
:collectAllJars
:setProperties
:generateTypescriptDefinitions SKIPPED
:copyTypings SKIPPED
:asbg:generateInterfaceNamesList
:asbg:traverseJsFiles
:asbg:runAstParser
Running full build
finished with reading lines with js files
:asbg:generateBindings
:generateF0F1DebugResValues UP-TO-DATE
:generateF0F1DebugResources UP-TO-DATE
:mergeF0F1DebugResources UP-TO-DATE
:processF0F1DebugManifest UP-TO-DATE
:processF0F1DebugResources
C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:17:24-47: AAPT: No resource found that matches the given name (at 'value' with value '@string/facebook_app_id').

C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:22:24-40: AAPT: No resource found that matches the given name (at 'label' with value '@string/app_name').

C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:42:24-40: AAPT: No resource found that matches the given name (at 'label' with value '@string/app_name').

C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:47:28-57: AAPT: No resource found that matches the given name (at 'label' with value '@string/title_activity_kimera').

C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:15: error: Error: No resource found that matches the given name (at 'value' with value '@string/facebook_app_id').

C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:19: error: Error: No resource found that matches the given name (at 'label' with value '@string/app_name').

C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:38: error: Error: No resource found that matches the given name (at 'label' with value '@string/app_name').

C:\repos\rolagroup-frontend\platforms\android\build\intermediates\manifests\full\F0F1\debug\AndroidManifest.xml:44: error: Error: No resource found that matches the given name (at 'label' with value '@string/title_activity_kimera').


:processF0F1DebugResources FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processF0F1DebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 15.17 secs
Unable to apply changes on device: 192.168.1.5:5555. Error is: Command gradlew.bat failed with exit code 1.
Executing after-watch hook from C:\repos\rolagroup-frontend\hooks\after-watch\nativescript-dev-typescript.js

This is my packages.json:

{
  "description": "NativeScript Application",
  "license": "SEE LICENSE IN <your-license-filename>",
  "readme": "NativeScript Application",
  "repository": "<fill-your-repository-here>",
  "nativescript": {
    "id": "org.nativescript.rolagroupfrontend",
    "tns-android": {
      "version": "3.1.1"
    }
  },
  "scripts": {
    "lint": "tslint \"app/**/*.ts\""
  },
  "dependencies": {
    "@angular/animations": "4.2.5",
    "@angular/common": "4.2.5",
    "@angular/compiler": "4.2.5",
    "@angular/core": "4.2.5",
    "@angular/forms": "4.2.5",
    "@angular/http": "4.2.5",
    "@angular/platform-browser": "4.2.5",
    "@angular/router": "4.2.5",
    "nativescript-angular": "4.2.0",
    "nativescript-gradient": "^2.0.1",
    "nativescript-localize": "^2.0.1",
    "nativescript-social-login": "^1.6.0",
    "nativescript-theme-core": "1.0.4",
    "reflect-metadata": "0.1.10",
    "rxjs": "5.4.3",
    "tns-core-modules": "3.1.1",
    "validator": "^8.1.0",
    "zone.js": "0.8.16"
  },
  "devDependencies": {
    "babel-traverse": "6.4.5",
    "babel-types": "6.4.5",
    "babylon": "6.4.5",
    "codelyzer": "3.1.2",
    "lazy": "1.0.11",
    "nativescript-dev-sass": "1.3.0",
    "nativescript-dev-typescript": "0.5.0",
    "node-sass": "4.5.3",
    "tslint": "5.6.0",
    "typescript": "2.4.2"
  }
}

Tried removing and then adding again tns platform android, also reinstalling the npm packages; but no luck.

I have SDK Build Tools and SDK Platform 23 and 25 installed. I’m running NativeScript 3.1.3, tns-core-modules 3.1.1 and tns-android 3.1.1. Any ideas?

UPDATE: Also tried adding those values manually to strings.xml, but that file just gets regenerated in every tns run.


#2

Solved the app_id and title_activity_kimera by addind app.name to the NativeScript-localize json (yes, I should really read the docs).

Had to remove the social login plugin since it requires the facebook_app_id string added manually to strings.xml and this file its generated by the localization plugin.


#3

In order to override plugins’ strings, you can make your own app/App_Resources/Android/values/strings.xml where you declare your own keys.


#4

I was doing that but, for some reason, the localization plugins keeps regenerating the strings.xml after every build with its own keys.