已经按照官网教程试过两遍了,困扰了很久,
日志内容:
编译模式:debug
使用 Android Studio 工程:D:\LiJiaJian\Project\changzheng85\code\build\jsb-link\frameworks\runtime-src\proj.android-studio
正在生成 apk 文件…
正在执行:’“D:\LiJiaJian\Project\changzheng85\code\build\jsb-link\frameworks\runtime-src\proj.android-studio\gradlew.bat” --parallel --info assembleDebug’
Initialized native services in: C:\Users\Administrator\.gradle\native
The client will now receive all logging from the daemon (pid: 14468). The daemon log file: C:\Users\Administrator\.gradle\daemon\4.10.3\daemon-14468.out.log
Starting 2nd build in daemon [uptime: 7 mins 52.704 secs, performance: 95%, no major garbage collections]
Using 8 worker leases.
Invalidating in-memory cache of D:\LiJiaJian\Project\changzheng85\code\build\jsb-link\frameworks\runtime-src\proj.android-studio\.gradle\4.10.3\fileHashes\fileHashes.bin
Starting Build
Settings evaluated using settings file 'D:\LiJiaJian\Project\changzheng85\code\build\jsb-link\frameworks\runtime-src\proj.android-studio\settings.gradle'.
Projects loaded. Root project using build file 'D:\LiJiaJian\Project\changzheng85\code\build\jsb-link\frameworks\runtime-src\proj.android-studio\build.gradle'.
Included projects: [root project 'proj.android-studio', project ':code', project ':game', project ':instantapp', project ':libcocos2dx']
Parallel execution is an incubating feature.
> Configure project :
Evaluating root project 'proj.android-studio' using build file 'D:\LiJiaJian\Project\changzheng85\code\build\jsb-link\frameworks\runtime-src\proj.android-studio\build.gradle'.
> Configure project :code
Evaluating project ':code' using build file 'D:\LiJiaJian\Project\changzheng85\code\build\jsb-link\frameworks\runtime-src\proj.android-studio\app\build.gradle'.
Creating configuration androidTestUtil
Creating configuration compile
Creating configuration apk
Creating configuration provided
Creating configuration api
Creating configuration implementation
Creating configuration runtimeOnly
Creating configuration compileOnly
Creating configuration wearApp
Creating configuration annotationProcessor
Creating configuration androidTestCompile
Creating configuration androidTestApk
Creating configuration androidTestProvided
Creating configuration androidTestApi
Creating configuration androidTestImplementation
Creating configuration androidTestRuntimeOnly
Creating configuration androidTestCompileOnly
Creating configuration androidTestWearApp
Creating configuration androidTestAnnotationProcessor
Creating configuration testCompile
Creating configuration testApk
Creating configuration testProvided
Creating configuration testApi
Creating configuration testImplementation
Creating configuration testRuntimeOnly
Creating configuration testCompileOnly
Creating configuration testWearApp
Creating configuration testAnnotationProcessor
NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to C:\Users\Administrator\AppData\Local\Android\Sdk\ndk.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
Creating configuration debugCompile
Creating configuration debugApk
Creating configuration debugProvided
Creating configuration debugApi
Creating configuration debugImplementation
Creating configuration debugRuntimeOnly
Creating configuration debugCompileOnly
Creating configuration debugWearApp
Creating configuration debugAnnotationProcessor
Creating configuration androidTestDebugCompile
Creating configuration androidTestDebugApk
Creating configuration androidTestDebugProvided
Creating configuration androidTestDebugApi
Creating configuration androidTestDebugImplementation
Creating configuration androidTestDebugRuntimeOnly
Creating configuration androidTestDebugCompileOnly
Creating configuration androidTestDebugWearApp
Creating configuration androidTestDebugAnnotationProcessor
Creating configuration testDebugCompile
Creating configuration testDebugApk
Creating configuration testDebugProvided
Creating configuration testDebugApi
Creating configuration testDebugImplementation
Creating configuration testDebugRuntimeOnly
Creating configuration testDebugCompileOnly
Creating configuration testDebugWearApp
Creating configuration testDebugAnnotationProcessor
Creating configuration releaseCompile
Creating configuration releaseApk
Creating configuration releaseProvided
Creating configuration releaseApi
Creating configuration releaseImplementation
Creating configuration releaseRuntimeOnly
Creating configuration releaseCompileOnly
Creating configuration releaseWearApp
Creating configuration releaseAnnotationProcessor
Creating configuration testReleaseCompile
Creating configuration testReleaseApk
Creating configuration testReleaseProvided
Creating configuration testReleaseApi
Creating configuration testReleaseImplementation
Creating configuration testReleaseRuntimeOnly
Creating configuration testReleaseCompileOnly
Creating configuration testReleaseWearApp
Creating configuration testReleaseAnnotationProcessor
Parsing the SDK, no caching allowed
Parsing legacy package: C:\Users\Administrator\AppData\Local\Android\Sdk\.temp\PackageOperation01\unzip\src
Parsing legacy package: C:\Users\Administrator\AppData\Local\Android\Sdk\.temp\PackageOperation02\unzip\android-9
Parsing legacy package: C:\Users\Administrator\AppData\Local\Android\Sdk\.temp\PackageOperation03\unzip\android-6.0
Parsing legacy package: C:\Users\Administrator\AppData\Local\Android\Sdk\.temp\PackageOperation04\unzip\src
Parsing legacy package: C:\Users\Administrator\AppData\Local\Android\Sdk\.temp\PackageOperation05\unzip\src
Parsing legacy package: C:\Users\Administrator\AppData\Local\Android\Sdk\.temp\PackageOperation06\unzip\android-8.0.0
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\build-tools\28.0.2\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\build-tools\28.0.3\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\build-tools\29.0.3\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\build-tools\30.0.0-rc4\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\build-tools\30.0.1\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\cmdline-tools\1.0\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\cmdline-tools\latest\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\emulator\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\extras\intel\Hardware_Accelerated_Execution_Manager\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\ndk\19.2.5345600\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\ndk\21.3.6528147\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\patcher\v4\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\platform-tools\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\platforms\android-27\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\platforms\android-29\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\sources\android-29\package.xml
Parsing C:\Users\Administrator\AppData\Local\Android\Sdk\tools\package.xml
SDK initialized in 154 ms
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':code'.
> java.lang.NullPointerException (no error message)
* Try:
Run with --stacktrace option to get the stack trace. Run with --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
执行命令出错,返回值:1。
我的配置:
NDK路径 : C:\Users\Administrator\AppData\Local\Android\Sdk\ndk
Android SDK路径 : C:\Users\Administrator\AppData\Local\Android\Sdk