生成失败,消息“processF0F1DebugResources FAILED”

时间:2017-08-24 14:38:22

标签: android nativescript

我正在尝试为Android构建this模板,我尚未对其进行修改。但是构建失败并显示以下消息:

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

这是我的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"
  }
}

尝试删除然后重新添加tns platform android,同时重新安装npm个包;但没有运气。

我安装了SDK Build Tools和SDK Platform 23和25。我在Windows 10 x64上运行NativeScript 3.1.3,tns-core-modules 3.1.1和tns-android 3.1.1。有什么想法吗?

更新:还尝试手动将这些值添加到strings.xml,但该文件只会在每个tns run中重新生成。

1 个答案:

答案 0 :(得分:0)

通过addind app_id解析title_activity_kimeraapp.nameNativeScript-localize json(是的,我应该真的阅读文档)。

必须删除社交登录插件,因为它需要手动将facebook_app_id字符串添加到strings.xml,并且此文件由本地化插件生成。