我仍然是Ionic的新手,所以几个星期前我编写了一个应用程序,出现了问题并且在使用命令“ionic build android”时崩溃了。 “离子服务”也行不通。
以下是构建的输出:
Running command: /home/USERNAME/IONIC_Workspace/local-business/hooks/after_prepareicons_and_splashscreens.js /home/USERNAME/IONIC_Workspace/local-business
Running command: /home/USERNAME/IONIC_Workspace/local-business/hooks/after_prepare/update_platform_config.js /home/USERNAME/IONIC_Workspace/local-business
Running command: /home/USERNAME/IONIC_Workspace/local-business/platforms/android/cordova/build
ANDROID_HOME=/home/USERNAME/Android/Sdk
JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
Running: /home/USERNAME/IONIC_Workspace/local-business/platforms/android/gradlew cdvBuildDebug -b /home/USERNAME/IONIC_Workspace/local-business/platforms/android/ build.gradle -Dorg.gradle.daemon=true
:preBuild
:compileDebugNdk UP-TO-DATE
:preDebugBuild
:checkDebugManifest
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:preBuild
:CordovaLib:preDebugBuild
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:compileDebugJava UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:packageDebugJar UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:packageDebugJniLibs UP-TO-DATE
:CordovaLib:packageDebugLocalJar UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
:preReleaseBuild
:CordovaLib:copyReleaseLint UP-TO-DATE
:CordovaLib:mergeReleaseProguardFiles UP-TO-DATE
:CordovaLib:preReleaseBuild
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseAidl UP-TO-DATE
:CordovaLib:compileReleaseRenderscript UP-TO-DATE
:CordovaLib:generateReleaseBuildConfig UP-TO-DATE
:CordovaLib:generateReleaseAssets UP-TO-DATE
:CordovaLib:mergeReleaseAssets UP-TO-DATE
:CordovaLib:generateReleaseResValues UP-TO-DATE
:CordovaLib:generateReleaseResources UP-TO-DATE
:CordovaLib:packageReleaseResources UP-TO-DATE
:CordovaLib:processReleaseManifest UP-TO-DATE
:CordovaLib:processReleaseResources UP-TO-DATE
:CordovaLib:generateReleaseSources UP-TO-DATE
:CordovaLib:compileReleaseJava UP-TO-DATE
:CordovaLib:processReleaseJavaRes UP-TO-DATE
:CordovaLib:packageReleaseJar UP-TO-DATE
:CordovaLib:compileReleaseNdk UP-TO-DATE
:CordovaLib:packageReleaseJniLibs UP-TO-DATE
:CordovaLib:packageReleaseLocalJar UP-TO-DATE
:CordovaLib:packageReleaseRenderscript UP-TO-DATE
:CordovaLib:bundleRelease UP-TO-DATE
:prepareComAndroidSupportSupportV132311Library UP-TO-DATE
:prepareComAndroidSupportSupportV42311Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBase830Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesBasement830Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesGcm830Library UP-TO-DATE
:prepareComGoogleAndroidGmsPlayServicesMeasurement830Library UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources
/home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/intermediates/assets/debug/www/node_modules/ionic/node_modules/ionic-app-lib/node_modules/archiver/node_modules/file-utils/node_modules/isbinaryfile/tests/fixtures/03_Руководство_по_эксплуатации.rst: error: Invalid filename. Unable to add.
:processDebugResources FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.internal.LoggedErrorException: Failed to run command:
/home/USERNAME/Android/Sdk/build-tools/23.0.2/aapt package -f --no-crunch -I /home/USERNAME/Android/Sdk/platforms/android-22/android.jar -M /home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml -S /home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/intermediates/res/debug -A /home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/intermediates/assets/debug -m -J /home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/generated/source/r/debug -F /home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/intermediates/res/resources-debug.ap_ --debug-mode --custom-package com.titaniumtemplates.local_business -0 apk --output-text-symbols /home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/intermediates/symbols/debug
Error Code:
1
Output:
/home/USERNAME/IONIC_Workspace/local-business/platforms/android/build/intermediates/assets/debug/www/node_modules/ionic/node_modules/ionic-app-lib/node_modules/archiver/node_modules/file-utils/node_modules/isbinaryfile/tests/fixtures/03_Руководство_по_эксплуатации.rst: error: Invalid filename. Unable to add.
* 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: 8.208 secs
/home/USERNAME/IONIC_Workspace/local-business/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /home/USERNAME/IONIC_Workspace/local-business/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/USERNAME/IONIC_Workspace/local-business/platforms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR building one of the platforms: Error: /home/USERNAME/IONIC_Workspace/local-business/platforms/android/cordova/build: Command failed with exit code 8
You may not have the required environment or OS to build this project
Error: /home/USERNAME/IONIC_Workspace/local-business/platforms/android/cordova/build: Command failed with exit code 8
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at ChildProcess.EventEmitter.emit (events.js:98:17)
at maybeClose (child_process.js:743:16)
at Process.ChildProcess._handle.onexit (child_process.js:810:5)
我的项目中没有使用03_Руководство_по_эксплуатации.rst这个文件而且不知道如何处理它。
有人可以提示如何解决我的问题。
答案 0 :(得分:0)
:processDebugResources任务尝试将03_Руководство_по_эксплуатации.rst复制到平台项目中的资源文件夹中。
为什么cordova想要复制此文件可能有不同的原因:
config.xml
你冷酷的尝试:
ionic build android
重新生成孔文件夹(就像删除缓存一样)config.xml
中是否提及该文件并删除该行