I’ve managed to compile new cocos 3.7 project under Android Studio (not easy though).
When I add Facebook plugin in the project then this compilation error occurs:
Skipping task ':libcocos2dx:compileDebugAidl' as it is up-to-date (took 0.008 secs).
:libPluginProtocol:compileReleaseNdk UP-TO-DATE
:libcocos2dx:compileDebugAidl (Thread[Task worker Thread 3,5,main]) completed. Took 0.011 secs.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':libPluginProtocol:compileReleaseNdk'.
> NDK not configured.
Download the NDK from http://developer.android.com/tools/sdk/ndk/.Then add ndk.dir=path/to/ndk in local.properties.
(On Windows, make sure you escape backslashes, e.g. C:\\ndk rather than C:\ndk)
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output.
BUILD FAILED
I’ve added the plugin in the projects with “Import Module” and then selecting the corresponding proj.android folder.
What I’ve tried:
- setting the same compile/target/min sdk/tools versions for all modules (copying the values from previously working module)
- Adding ndk.dir to my project local.properties
- Adding ndk.dir to libPluginProtocol local.properties
I’m compiling from the command line: cocos compile -p android --android-studio
Environment: cocos-js 3.7, ndk=r10c