Я получаю эту ошибку. CMAKE_CXX_COMPILER не установлен, после EnableLanguage
Я пытаюсь скомпилировать проект, для которого Android-студия сказала, что ему нужен NDK, а затем CMAKE.Он загрузил оба и синхронизировал проект, но я получил эту ошибку.
Эта ошибка была исправлена, но теперь у меня есть другие ошибки
External Native Build Issues
Build command failed.
Error while executing process C:\Users\sriranjan\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\research\speaker recognition\android-alize-master\alize -BC:\research\speaker recognition\android-alize-master\alize\.externalNativeBuild\cmake\release\armeabi-v7a -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-16 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\research\speaker recognition\android-alize-master\alize\build\intermediates\cmake\release\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Release -DANDROID_NDK=C:\Users\sriranjan\AppData\Local\Android\Sdk\ndk-bundle -DCMAKE_TOOLCHAIN_FILE=C:\Users\sriranjan\AppData\Local\Android\Sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\sriranjan\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}
-- Check for working C compiler: C:/Users/sriranjan/AppData/Local/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: C:/Users/sriranjan/AppData/Local/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Users/sriranjan/AppData/Local/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
-- Check for working CXX compiler: C:/Users/sriranjan/AppData/Local/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
CMake Error at CMakeLists.txt:96 (add_library):
src/main/cpp/alize-core/src/alizeString.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
CMake Error: CMake can not determine linker language for target: alize-native
-- Generating done
-- Build files have been written to: C:/research/speaker recognition/android-alize-master/alize/.externalNativeBuild/cmake/release/armeabi-v7a
Build command failed.
Error while executing process C:\Users\sriranjan\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HC:\research\speaker recognition\android-alize-master\alize -BC:\research\speaker recognition\android-alize-master\alize\.externalNativeBuild\cmake\debug\armeabi-v7a -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-16 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=C:\research\speaker recognition\android-alize-master\alize\build\intermediates\cmake\debug\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=C:\Users\sriranjan\AppData\Local\Android\Sdk\ndk-bundle -DCMAKE_TOOLCHAIN_FILE=C:\Users\sriranjan\AppData\Local\Android\Sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=C:\Users\sriranjan\AppData\Local\Android\Sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}
-- Check for working C compiler: C:/Users/sriranjan/AppData/Local/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
-- Check for working C compiler: C:/Users/sriranjan/AppData/Local/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Users/sriranjan/AppData/Local/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe
-- Check for working CXX compiler: C:/Users/sriranjan/AppData/Local/Android/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
CMake Error at CMakeLists.txt:96 (add_library):
src/main/cpp/alize-core/src/alizeString.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
CMake Error: CMake can not determine linker language for target: alize-native
-- Generating done
-- Build files have been written to: C:/research/speaker recognition/android-alize-master/alize/.externalNativeBuild/cmake/debug/armeabi-v7a
C:\research\speaker recognition\android-alize-master\alize\build.gradle
Warning:Warning:Configuration 'androidTestCompile' is obsolete and has been replaced with 'androidTestImplementation' and 'androidTestApi'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Warning:Warning:Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Warning:Warning:Configuration 'androidTestApi' is obsolete and has been replaced with 'androidTestImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Warning:Warning:Configuration 'testCompile' is obsolete and has been replaced with 'testImplementation' and 'testApi'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Warning:Warning:Configuration 'testApi' is obsolete and has been replaced with 'testImplementation'.
It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html
Дальнейшее продвижение ... Упоминается добавить содержимоепапки src из alize-core и LIA-RAL.У alize-core также есть папка include.Должен ли я добавить их тоже.И у LIA-RAL есть много папок и много папок src в этих папках.Поэтому я не уверен, как добавить содержимое из этих папок в папку cpp.
Когда я добавил папки напрямую, я получил следующие ошибки.
Error:FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ':alize'. > executing external native build for cmake C:\research\speaker recognition\android-alize-master\alize\CMakeLists.txt * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Я не уверен, какчтобы добавить содержимое всех этих папок из основной папки репо.
Я получаю эту ошибку
CMake Error at CMakeLists.txt:96 (add_library):
src/main/cpp/alize-core/src/alizeString.cpp
Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
.hxx .in .txx
CMake Error: CMake can not determine linker language for target: alize-native
Последняя ошибка это
Error:(2) error: attribute 'package' in <manifest> tag is not a valid Android package name: 'AlizeSpkRec'.
Error:org.gradle.internal.UncheckedException: com.android.ide.common.process.ProcessException: Failed to execute aapt
Error:com.android.ide.common.process.ProcessException: Failed to execute aapt
Error:java.util.concurrent.ExecutionException: java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
Error:java.util.concurrent.ExecutionException: com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
Error:com.android.builder.internal.aapt.v2.Aapt2Exception: AAPT2 error: check logs for details
Это мой манифестtag
manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="AlizeSpkRec"
android:versionCode="1"
android:versionName="1.0" >
Таким образом, чтобы преодолеть манифестную ошибку, я дал имя пакета как com.android.AlizeSpkRec, но он перезаписывается только в AlizeSpkRec.И файл AndroidManifest.xml находится в alize / build / промежуточный / manifes / aapt / release и в / debug.Похоже, что каждый раз, когда я пытаюсь построить проект, он переписывается.Так где же хранится фактическое имя пакета и как его изменить?