0

そのため、 Tabris.JSアプリを作成しましたが、アプリにアイコンを追加しようとするまではすべて正常に機能していました。

Android アプリをビルドしようとすると、次のエラーが発生します。

:processDebugResources/home/travis/build/eclipsesource/tabris-js-build-template/build/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:27:23-37 : AAPT: No resource found that matches the given name (at 'icon' with value '@drawable/icon').
 FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/local/android-sdk/build-tools/22.0.1/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
Total time: 2 mins 3.366 secs
Error: Error code 1 for command: /home/travis/build/eclipsesource/tabris-js-build-template/build/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/travis/build/eclipsesource/tabris-js-build-template/build/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true

(..)

/home/travis/build/eclipsesource/tabris-js-build-template/build/platforms/android/build/intermediates/manifests/full/debug/AndroidManifest.xml:27:23-37 : AAPT: No resource found that matches the given name (at 'icon' with value '@drawable/icon').
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/local/android-sdk/build-tools/22.0.1/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.
Error: Error code 1 for command: /home/travis/build/eclipsesource/tabris-js-build-template/build/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/travis/build/eclipsesource/tabris-js-build-template/build/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true
 Use --force to continue.
Aborted due to warnings.
travis_time:end:033db81c:start=1471880105396556780,finish=1471880238929469762,duration=133532912982

The command "grunt build deploy" exited with 6.
Done. Your build exited with 1.

フォルダの構造は次のとおりです。

/cordova
    /config.xml
/res
    /icon.png
/package.json

もちろん他のファイルもありますが、それらは問題ではありません。

config.xml は次のようになります。

<?xml version='1.0' encoding='utf-8'?>
<widget id="xx.xx.xx" version="0.1.0">
  <name>xxx xx</name>
  <description>
    xxx
  </description>
  <author email="xxx@xx.xx" href="https://xx.xx.xx">
    xxx
  </author>
   <plugin name="cordova-plugin-dialogs" version="1.1.1" />
   <platform name="android">
      <icon src="../res/icon.png" />
  </platform>
</widget>

誰かがそれを修正するのを手伝ってくれることを願っています!

4

1 に答える 1

0

理由はわかりませんがdrawable、フォルダーの名前を追加する必要がありました。試行錯誤でこれを見つけました。

于 2016-08-23T12:48:11.737 に答える