UnityもAndroidも初心者なので、変なことを書いているかもしれませんがご了承願います。
Unityのプロジェクトに自作の、Android Studioで作成したaarファイルを組み込み、ビルドしたところ
このようなエラーが出ます。
Android Studioでビルドした際には特に何もエラーなど出ていなかったので、問題無いと思っていたのですがこれはやはりaarの作成手順?か何かがおかしいのでしょうか?
(恐らくJavaコード自体にエラーがあるならAndroid Studio側でエラーが出ると思うので、Javaコードに間違いは無いと思っています)
正直、何をどこから調べればいいのかも分からず途方に暮れています。
ググってみたところ、Keyが自分の物じゃないからエラーが出るんだ的な事が書かれているフォーラム等もあったのですが、そもそもapkじゃないaarにもKeyなどあるのでしょうか?
何か追加情報が恐らく必要だと思うのですが、何を貼れば良いのかすらよく分からないのでこの時点で質問出させて頂きます。
すみませんが指示をお願いします。
補足情報:
Unity側コンソールメッセージですが、貼ると凄まじく長いので躊躇しています。上の方だけ貼りますと
CommandInvokationFailure: Gradle build failed.
D:\Applications\Unity\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\OpenJDK\bin\java.exe -classpath "D:\Applications\Unity\2021.3.4f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\gradle\lib\gradle-launcher-6.1.1.jar" org.gradle.launcher.GradleMain "-Dorg.gradle.jvmargs=-Xmx4096m" "assembleRelease"
stderr[
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':launcher:processReleaseResources'.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
C:\Users\takuma\.gradle\caches\transforms-2\files-2.1\7c46687744f6f7a54e3515acf7918fca\unityeightbridge-debug\res\values\values.xml:11:5-23:13: AAPT: error: style attribute 'attr/colorPrimary (aka com.DefaultCompany.com.unity.template.mobile2D:attr/colorPrimary)' not found. C:\Users\takuma\.gradle\caches\transforms-2\files-2.1\7c46687744f6f7a54e3515acf7918fca\unityeightbridge-debug\res\values\values.xml:11:5-23:13: AAPT: error: style attribute 'attr/colorPrimaryVariant (aka com.DefaultCompany.com.unity.template.mobile2D:attr/colorPrimaryVariant)' not found. C:\Users\takuma\.gradle\caches\transforms-2\files-2.1\7c46687744f6f7a54e3515acf7918fca\unityeightbridge-debug\res\values\values.xml:11:5-23:13: AAPT: error: style attribute 'attr/colorOnPrimary (aka com.DefaultCompany.com.unity.template.mobile2D:attr/colorOnPrimary)' not found. C:\Users\takuma\.gradle\caches\transforms-2\files-2.1\7c46687744f6f7a54e3515acf7918fca\unityeightbridge-debug\res\values\values.xml:11:5-23:13: AAPT: error: style attribute 'attr/colorSecondary (aka com.DefaultCompany.com.unity.template.mobile2D:attr/colorSecondary)' not found. C:\Users\takuma\.gradle\caches\transforms-2\files-2.1\7c46687744f6f7a54e3515acf7918fca\unityeightbridge-debug\res\values\values.xml:11:5-23:13: AAPT: error: style attribute 'attr/colorSecondaryVariant (aka com.DefaultCompany.com.unity.template.mobile2D:attr/colorSecondaryVariant)' not found. C:\Users\takuma\.gradle\caches\transforms-2\files-2.1\7c46687744f6f7a54e3515acf7918fca\unityeightbridge-debug\res\values\values.xml:11:5-23:13: AAPT: error: style attribute 'attr/colorOnSecondary (aka com.DefaultCompany.com.unity.template.mobile2D:attr/colorOnSecondary)' not found. C:\Users\takuma\.gradle\caches\transforms-2\files-2.1\7c46687744f6f7a54e3515acf7918fca\unityeightbridge-debug\res\values\values.xml:11:5-23:13: AAPT: error: resource attr/colorPrimaryVariant (aka com.DefaultCompany.com.unity.template.mobile2D:attr/colorPrimaryVariant) not found. C:\Users\takuma\.gradle\caches\transforms-2\files-2.1\7c46687744f6f7a54e3515acf7918fca\unityeightbridge-debug\res\values-night-v8\values-night-v8.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorPrimary (aka com.DefaultCompany.com.unity.template.mobile2D:attr/colorPrimary)' not found. C:\Users\takuma\.gradle\caches\transforms-2\files-2.1\7c46687744f6f7a54e3515acf7918fca\unityeightbridge-debug\res\values-night-v8\values-night-v8.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorPrimaryVariant (aka com.DefaultCompany.com.unity.template.mobile2D:attr/colorPrimaryVariant)' not found. C:\Users\takuma\.gradle\caches\transforms-2\files-2.1\7c46687744f6f7a54e3515acf7918fca\unityeightbridge-debug\res\values-night-v8\values-night-v8.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorOnPrimary (aka com.DefaultCompany.com.unity.template.mobile2D:attr/colorOnPrimary)' not found. C:\Users\takuma\.gradle\caches\transforms-2\files-2.1\7c46687744f6f7a54e3515acf7918fca\unityeightbridge-debug\res\values-night-v8\values-night-v8.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorSecondary (aka com.DefaultCompany.com.unity.template.mobile2D:attr/colorSecondary)' not found. C:\Users\takuma\.gradle\caches\transforms-2\files-2.1\7c46687744f6f7a54e3515acf7918fca\unityeightbridge-debug\res\values-night-v8\values-night-v8.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorSecondaryVariant (aka com.DefaultCompany.com.unity.template.mobile2D:attr/colorSecondaryVariant)' not found. C:\Users\takuma\.gradle\caches\transforms-2\files-2.1\7c46687744f6f7a54e3515acf7918fca\unityeightbridge-debug\res\values-night-v8\values-night-v8.xml:3:5-15:13: AAPT: error: style attribute 'attr/colorOnSecondary (aka com.DefaultCompany.com.unity.template.mobile2D:attr/colorOnSecondary)' not found. C:\Users\takuma\.gradle\caches\transforms-2\files-2.1\7c46687744f6f7a54e3515acf7918fca\unityeightbridge-debug\res\values-night-v8\values-night-v8.xml:3:5-15:13: AAPT: error: resource attr/colorPrimaryVariant (aka com.DefaultCompany.com.unity.template.mobile2D:attr/colorPrimaryVariant) not found.
- Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
となっています
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。