質問をすることでしか得られない、回答やアドバイスがある。

15分調べてもわからないことは、質問しよう!

新規登録して質問してみよう
ただいま回答率
85.48%
Android

Androidは、Google社が開発したスマートフォンやタブレットなど携帯端末向けのプラットフォームです。 カーネル・ミドルウェア・ユーザーインターフェイス・ウェブブラウザ・電話帳などのアプリケーションやソフトウェアをひとつにまとめて構成。 カーネル・ライブラリ・ランタイムはほとんどがC言語/C++、アプリケーションなどはJavaSEのサブセットとAndroid環境で書かれています。

Unity

Unityは、Unity Technologiesが開発・販売している、IDEを内蔵するゲームエンジンです。主にC#を用いたプログラミングでコンテンツの開発が可能です。

Q&A

解決済

1回答

2202閲覧

UnityでNend広告実装で、「CommandInvokationFailure: Failed to re-package resources」のエラー

po_tato

総合スコア97

Android

Androidは、Google社が開発したスマートフォンやタブレットなど携帯端末向けのプラットフォームです。 カーネル・ミドルウェア・ユーザーインターフェイス・ウェブブラウザ・電話帳などのアプリケーションやソフトウェアをひとつにまとめて構成。 カーネル・ライブラリ・ランタイムはほとんどがC言語/C++、アプリケーションなどはJavaSEのサブセットとAndroid環境で書かれています。

Unity

Unityは、Unity Technologiesが開発・販売している、IDEを内蔵するゲームエンジンです。主にC#を用いたプログラミングでコンテンツの開発が可能です。

0グッド

0クリップ

投稿2018/06/20 02:48

編集2018/06/25 03:04

UnityでNend広告を実装しよとしたところ
下記のようなエラーが表示されました。
試したことは
・jdkのアップデート
・android sdkマネージャーでapiアップデート
・toolsフォルダの
User/ライブラリ/Android/sdk/toolsを項目数が多いtools(調べていたどこかのサイトに貼られていたリンクから取得したディレクトリ)に交換。
等をしましたが、改善できませんでした。

ちなみに、2行目のbuild-tools/26.0.0とあるのですが、もともと27.0.2と書いてあり、
User/ライブラリ/Android/sdk/build-toolsにあった、27.0.2を削除したら、どんどん下の数字に下がってきてしまい、今の26.0.0となっています。

CommandInvokationFailure: Failed to re-package resources. /Users/User/Library/android/sdk/build-tools/26.0.0/aapt package --auto-add-overlay -v -f -m -J "gen" -M "AndroidManifest.xml" -S "res" -I "/Users/User/Library/android/sdk/platforms/android-26/android.jar" -F bin/resources.ap_ --extra-packages com.nifty.cloud.mb.ncmbgcmplugin:android.arch.lifecycle:android.support.v7.cardview:android.support.constraint:android.support.v7.recyclerview:android.support.compat:android.support.coreui:android.support.coreutils:android.support.fragment:android.support.mediacompat:android.support.v4:com.google.android.gms.base:com.google.android.gms.base.license:com.google.android.gms:com.google.android.gms.common.license:com.google.android.gms.location:com.google.android.gms.location.license:com.google.android.gms.tasks:com.google.android.gms.tasks.license:net.nend.unity.plugin:net.nend.android:com.google.android.gms.base:com.google.android.gms:com.google.android.gms.gcm:com.google.android.gms.iid:com.google.android.gms.tasks:android.support.compat:android.support.coreutils:android.support.v4:com.company.Project.resources -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/NcmbGcmPlugin/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/android.arch.lifecycle.runtime-1.0.3/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.cardview-v7-27.0.2/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.constraint.constraint-layout-1.0.2/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.recyclerview-v7-27.0.2/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.support-compat-27.0.2/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.support-core-ui-27.0.2/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.support-core-utils-27.0.2/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.support-fragment-27.0.2/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.support-media-compat-27.0.2/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.support-v4-27.0.2/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.google.android.gms.play-services-base-11.8.0/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.google.android.gms.play-services-basement-11.8.0/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.google.android.gms.play-services-location-11.8.0/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.google.android.gms.play-services-tasks-11.8.0/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/nend-unity-plugin/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/nendSDK-4.0.4/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/play-services-base-11.0.0/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/play-services-basement-11.0.0/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/play-services-gcm-11.0.0/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/play-services-iid-11.0.0/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/play-services-tasks-11.0.0/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/support-compat-26.0.2/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/support-core-utils-26.0.2/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/support-v4-26.0.2/res" -S "/Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/unity-android-resources/res" stderr[ /Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.support-compat-27.0.2/res/layout/notification_action.xml:17: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <LinearLayout> /Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.support-compat-27.0.2/res/layout/notification_action.xml:32: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <TextView> /Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.support-compat-27.0.2/res/layout/notification_action.xml: note: using v17 attributes; synthesizing resource com.company.Project:layout/notification_action for configuration v17. /Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.support-compat-27.0.2/res/layout/notification_action_tombstone.xml:18: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <LinearLayout> /Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.support-compat-27.0.2/res/layout/notification_action_tombstone.xml:37: note: removing attribute http://schemas.android.com/apk/res/android:paddingStart from <TextView> /Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.support-compat-27.0.2/res/layout/notification_action_tombstone.xml: note: using v17 attributes; synthesizing resource com.company.Project:layout/notification_action_tombstone for configuration v17. /Users/User/Desktop/Unity/Project/Temp/StagingArea/android-libraries/com.android.support.support-media-compat-27.0.2/res/layout/notification_template_big_media.xml:42: note: removing attribute http://schemas.android.com/apk/res/android:layoutDirection from <LinearLayout> /Users/User/Desktop/Unity/Project/Temp/StagingArea/android-<message truncated>

イメージ説明

追記
unityからandroidへbuildしようとすると、タイトルのエラーログが表示され失敗するのですが、
この画像のようにbuildの際に作成されるTemp/StagingArea/aarの中に"27.1.0"や"11.8.0"などが作成されています。(もちろんですが、このaarフォルダの中身全部消してbuildしても復活します。)これは何かのmanifestFileから作成されているものなのでしょうか?AndroidのSDKマネージャーから27などはアンインストールして消しているはずなんですが、、なぜでしょう、、
イメージ説明
イメージ説明

気になる質問をクリップする

クリップした質問は、後からいつでもMYページで確認できます。

またクリップした質問に回答があった際、通知やメールを受け取ることができます。

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

guest

回答1

0

自己解決

https://answers.unity.com/questions/1433892/ioexception-failed-to-move-file-directory.html

このサイトを参考に、
・Nendパッケージ
・PlayServicesResolver
・plugins > Android
を削除して、Unity再起動。
Unityのタブの
Assets > PlayServicesResolver > Android Resolver > Force Resolve Build
を行ったら無事エラーは消え、build、build&Run共に成功しました!

投稿2018/06/26 09:14

po_tato

総合スコア97

バッドをするには、ログインかつ

こちらの条件を満たす必要があります。

あなたの回答

tips

太字

斜体

打ち消し線

見出し

引用テキストの挿入

コードの挿入

リンクの挿入

リストの挿入

番号リストの挿入

表の挿入

水平線の挿入

プレビュー

15分調べてもわからないことは
teratailで質問しよう!

ただいまの回答率
85.48%

質問をまとめることで
思考を整理して素早く解決

テンプレート機能で
簡単に質問をまとめる

質問する

関連した質問