環境
Unity5.6
Android2.3.2
とっかかり
UnityAndoridプラグイン開発でUnity5.6に戻して確認したかったが「Unable to list target platforms」が出てこまった。
検索結果⇓
【Unity、Android】最新のAndroidStudio入れたらUnable to list target platforms.が出て困った
https://blog.naichilab.com/entry/unable-to-list-target-platforms
⇓
Unity5.6でプロジェクトは出力&AndrodiStudio2.3.2でビルド及び実行できた。
確認したこと
・Unity5.6のExportは単一project。
・unity2019のExportは複数projectであり、AppMainではなくNativeLib(***.so)はLIB側にある。
→ AndroidStudio4でLIB側はC++でステップ実行できない。
昔の方がよかったんじゃね?
エラー対応
Error:org.gradle.api.internal.tasks.DefaultTaskInputs$TaskInputUnionFileCollection cannot be cast to org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection
Possible causes for this unexpected error include:<ul><li>Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
<a href="syncProject">Re-download dependencies and sync project (requires network)</a></li><li>The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
<a href="stopGradleDaemons">Stop Gradle build processes (requires restart)</a></li><li>Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.</li></ul>In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
⇓⇓ こうして、
buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
}
}
⇓
18:08 Error running test1: Instant Run requires 'Tools | Android | Enable ADB integration' to be enabled.
[Tools]-[Android]-[Enable ADB integration]を実行する。
⇓
実行できた。