ndk报错Error: Android NDK: Aborting....Stop.

请问大神ndk报错:Error:(198) *** Android NDK: Aborting... . Stop.Error:Execution failed for task ':libuvccamera:ndkBuild'.

Process 'command 'C:\Users\Administrator\AppData\Local\Android\Sdk\ndk-bundle/ndk-build.cmd'' finished with non-zero exit value 2是什么原因,怎么解决

1个回答

这是你的ndk环境配置问题吧,ndk路径配置对了应该没问题的

csdn_zxw
csdn_zxw 回复ljxzhuce: android studio里面的啊
接近 3 年之前 回复
ljxzhuce
ljxzhuce 你是说android studio里的还是系统环境下的
接近 3 年之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
NDK 出现错误,求大神解答!!!
一个程序源码中使用到了jni,我把项目运行时出现以下错误,求大神解答!!! ![图片说明](https://img-ask.csdn.net/upload/201611/18/1479440834_261363.png) Information:Gradle tasks [:app:clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :app:assembleDebug] Warning:Deprecated NDK integration enabled by useDeprecatedNdk flag in gradle.properties will be removed from Android Gradle plugin soon. D:\DevelopFile\android-ndk-r13b\build\core\add-application.mk Error:(198) *** Android NDK: Aborting... . Stop. Error:Execution failed for task ':dbf:compileReleaseNdk'. > com.android.ide.common.process.ProcessException: Error while executing 'D:\DevelopFile\android-ndk-r13b\ndk-build.cmd' with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=F:\Android Code\LiaoNing\dbf\build\intermediates\ndk\release\Android.mk APP_PLATFORM=android-23 NDK_OUT=F:\Android Code\LiaoNing\dbf\build\intermediates\ndk\release\obj NDK_LIBS_OUT=F:\Android Code\LiaoNing\dbf\build\intermediates\ndk\release\lib APP_ABI=armeabi} Information:BUILD FAILED Information:Total time: 2.432 secs Information:2 errors Information:1 warning Information:See complete output in console
SDL2 编译报错error: undefined reference to 'openslES_ResumeDevices' 求解决思路
android studio编译SDL2生成.so文件时,报错如下: ``` Build command failed. Error while executing process /Users/ing/sdk/ndk-bundle/ndk-build with arguments {NDK_PROJECT_PATH=null APP_BUILD_SCRIPT=/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/Android.mk NDK_APPLICATION_MK=/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/Application.mk APP_ABI=x86_64 NDK_ALL_ABIS=x86_64 NDK_DEBUG=1 APP_PLATFORM=android-16 NDK_OUT=/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/build/intermediates/ndkBuild/debug/obj NDK_LIBS_OUT=/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/build/intermediates/ndkBuild/debug/lib /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/build/intermediates/ndkBuild/debug/obj/local/x86_64/libSDL2.so} [x86_64] Compile : SDL2 <= SDL.c [x86_64] Compile : SDL2 <= SDL_assert.c [x86_64] Compile : SDL2 <= SDL_dataqueue.c [x86_64] Compile : SDL2 <= SDL_error.c [x86_64] Compile : SDL2 <= SDL_hints.c [x86_64] Compile : SDL2 <= SDL_log.c [x86_64] Compile : SDL2 <= SDL_audio.c [x86_64] Compile : SDL2 <= SDL_audiocvt.c [x86_64] Compile : SDL2 <= SDL_audiodev.c [x86_64] Compile : SDL2 <= SDL_audiotypecvt.c [x86_64] Compile : SDL2 <= SDL_mixer.c [x86_64] Compile : SDL2 <= SDL_wave.c [x86_64] Compile : SDL2 <= SDL_androidaudio.c [x86_64] Compile : SDL2 <= SDL_dummyaudio.c [x86_64] Compile : SDL2 <= SDL_atomic.c [x86_64] Compile : SDL2 <= SDL_spinlock.c [x86_64] Compile : SDL2 <= SDL_android.c [x86_64] Compile : SDL2 <= SDL_cpuinfo.c [x86_64] Compile : SDL2 <= SDL_dynapi.c [x86_64] Compile : SDL2 <= SDL_clipboardevents.c [x86_64] Compile : SDL2 <= SDL_displayevents.c [x86_64] Compile : SDL2 <= SDL_dropevents.c [x86_64] Compile : SDL2 <= SDL_events.c /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:285:59: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_FINGERDOWN) PRINT_FINGER_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:282:50: note: expanded from macro 'PRINT_FINGER_EVENT' (uint) event->tfinger.timestamp, event->tfinger.touchId, \ ^~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:285:59: warning: format specifies type 'long long' but the argument has type 'SDL_FingerID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_FINGERDOWN) PRINT_FINGER_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:283:17: note: expanded from macro 'PRINT_FINGER_EVENT' event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, \ ^~~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:286:57: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_FINGERUP) PRINT_FINGER_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:282:50: note: expanded from macro 'PRINT_FINGER_EVENT' (uint) event->tfinger.timestamp, event->tfinger.touchId, \ ^~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:286:57: warning: format specifies type 'long long' but the argument has type 'SDL_FingerID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_FINGERUP) PRINT_FINGER_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:283:17: note: expanded from macro 'PRINT_FINGER_EVENT' event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, \ ^~~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:287:61: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_FINGERMOTION) PRINT_FINGER_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:282:50: note: expanded from macro 'PRINT_FINGER_EVENT' (uint) event->tfinger.timestamp, event->tfinger.touchId, \ ^~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:287:61: warning: format specifies type 'long long' but the argument has type 'SDL_FingerID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_FINGERMOTION) PRINT_FINGER_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:283:17: note: expanded from macro 'PRINT_FINGER_EVENT' event->tfinger.fingerId, event->tfinger.x, event->tfinger.y, \ ^~~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:295:62: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_DOLLARGESTURE) PRINT_DOLLAR_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:292:51: note: expanded from macro 'PRINT_DOLLAR_EVENT' (uint) event->dgesture.timestamp, event->dgesture.touchId, \ ^~~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:295:62: warning: format specifies type 'long long' but the argument has type 'SDL_GestureID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_DOLLARGESTURE) PRINT_DOLLAR_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:293:17: note: expanded from macro 'PRINT_DOLLAR_EVENT' event->dgesture.gestureId, (uint) event->dgesture.numFingers, \ ^~~~~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:296:61: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_DOLLARRECORD) PRINT_DOLLAR_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:292:51: note: expanded from macro 'PRINT_DOLLAR_EVENT' (uint) event->dgesture.timestamp, event->dgesture.touchId, \ ^~~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:296:61: warning: format specifies type 'long long' but the argument has type 'SDL_GestureID' (aka 'long') [-Wformat] SDL_EVENT_CASE(SDL_DOLLARRECORD) PRINT_DOLLAR_EVENT(event); break; ~~~~~~~~~~~~~~~~~~~^~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:293:17: note: expanded from macro 'PRINT_DOLLAR_EVENT' event->dgesture.gestureId, (uint) event->dgesture.numFingers, \ ^~~~~~~~~~~~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/events/SDL_events.c:301:51: warning: format specifies type 'long long' but the argument has type 'SDL_TouchID' (aka 'long') [-Wformat] (uint) event->mgesture.timestamp, event->mgesture.touchId, ^~~~~~~~~~~~~~~~~~~~~~~ 11 warnings generated. [x86_64] Compile : SDL2 <= SDL_gesture.c [x86_64] Compile : SDL2 <= SDL_keyboard.c [x86_64] Compile : SDL2 <= SDL_mouse.c [x86_64] Compile : SDL2 <= SDL_quit.c [x86_64] Compile : SDL2 <= SDL_touch.c [x86_64] Compile : SDL2 <= SDL_windowevents.c [x86_64] Compile : SDL2 <= SDL_rwops.c [x86_64] Compile : SDL2 <= SDL_haptic.c [x86_64] Compile : SDL2 <= SDL_syshaptic.c [x86_64] Compile : SDL2 <= SDL_gamecontroller.c [x86_64] Compile : SDL2 <= SDL_joystick.c [x86_64] Compile : SDL2 <= SDL_sysjoystick.c [x86_64] Compile : SDL2 <= SDL_hidapi_ps4.c [x86_64] Compile : SDL2 <= SDL_hidapi_switch.c [x86_64] Compile : SDL2 <= SDL_hidapi_xbox360.c [x86_64] Compile : SDL2 <= SDL_hidapi_xboxone.c [x86_64] Compile : SDL2 <= SDL_hidapijoystick.c [x86_64] Compile : SDL2 <= SDL_sysloadso.c [x86_64] Compile : SDL2 <= SDL_power.c [x86_64] Compile : SDL2 <= SDL_syspower.c [x86_64] Compile : SDL2 <= SDL_sysfilesystem.c [x86_64] Compile : SDL2 <= SDL_sensor.c [x86_64] Compile : SDL2 <= SDL_androidsensor.c [x86_64] Compile : SDL2 <= SDL_d3dmath.c [x86_64] Compile : SDL2 <= SDL_render.c [x86_64] Compile : SDL2 <= SDL_yuv_sw.c [x86_64] Compile : SDL2 <= SDL_render_d3d.c [x86_64] Compile : SDL2 <= SDL_shaders_d3d.c [x86_64] Compile : SDL2 <= SDL_render_d3d11.c [x86_64] Compile : SDL2 <= SDL_shaders_d3d11.c [x86_64] Compile : SDL2 <= SDL_render_gl.c [x86_64] Compile : SDL2 <= SDL_shaders_gl.c [x86_64] Compile : SDL2 <= SDL_render_gles.c [x86_64] Compile : SDL2 <= SDL_render_gles2.c In file included from /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/render/opengles2/SDL_render_gles2.c:273: /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/render/opengles2/SDL_gles2funcs.h:58:1: warning: incompatible pointer types assigning to 'void (*)(GLuint, GLsizei, const GLchar **, const GLint *)' (aka 'void (*)(unsigned int, int, const char **, const int *)') from 'void (GLuint, GLsizei, const GLchar *const *, const GLint *)' (aka 'void (unsigned int, int, const char *const *, const int *)') [-Wincompatible-pointer-types] SDL_PROC(void, glShaderSource, (GLuint, GLsizei, const GLchar **, const GLint *)) ^ ~~~~~~~~~~~~~~ /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/render/opengles2/SDL_render_gles2.c:262:45: note: expanded from macro 'SDL_PROC' #define SDL_PROC(ret,func,params) data->func=func; ^~~~~ 1 warning generated. [x86_64] Compile : SDL2 <= SDL_shaders_gles2.c [x86_64] Compile : SDL2 <= SDL_render_psp.c [x86_64] Compile : SDL2 <= SDL_blendfillrect.c [x86_64] Compile : SDL2 <= SDL_blendline.c [x86_64] Compile : SDL2 <= SDL_blendpoint.c [x86_64] Compile : SDL2 <= SDL_drawline.c [x86_64] Compile : SDL2 <= SDL_drawpoint.c [x86_64] Compile : SDL2 <= SDL_render_sw.c [x86_64] Compile : SDL2 <= SDL_rotate.c [x86_64] Compile : SDL2 <= SDL_getenv.c [x86_64] Compile : SDL2 <= SDL_iconv.c [x86_64] Compile : SDL2 <= SDL_malloc.c [x86_64] Compile : SDL2 <= SDL_qsort.c [x86_64] Compile : SDL2 <= SDL_stdlib.c [x86_64] Compile : SDL2 <= SDL_string.c [x86_64] Compile : SDL2 <= SDL_thread.c [x86_64] Compile : SDL2 <= SDL_syscond.c [x86_64] Compile : SDL2 <= SDL_sysmutex.c [x86_64] Compile : SDL2 <= SDL_syssem.c [x86_64] Compile : SDL2 <= SDL_systhread.c [x86_64] Compile : SDL2 <= SDL_systls.c [x86_64] Compile : SDL2 <= SDL_timer.c [x86_64] Compile : SDL2 <= SDL_systimer.c [x86_64] Compile : SDL2 <= SDL_RLEaccel.c [x86_64] Compile : SDL2 <= SDL_blit.c [x86_64] Compile : SDL2 <= SDL_blit_0.c [x86_64] Compile : SDL2 <= SDL_blit_1.c [x86_64] Compile : SDL2 <= SDL_blit_A.c [x86_64] Compile : SDL2 <= SDL_blit_N.c [x86_64] Compile : SDL2 <= SDL_blit_auto.c [x86_64] Compile : SDL2 <= SDL_blit_copy.c [x86_64] Compile : SDL2 <= SDL_blit_slow.c [x86_64] Compile : SDL2 <= SDL_bmp.c [x86_64] Compile : SDL2 <= SDL_clipboard.c [x86_64] Compile : SDL2 <= SDL_egl.c [x86_64] Compile : SDL2 <= SDL_fillrect.c [x86_64] Compile : SDL2 <= SDL_pixels.c [x86_64] Compile : SDL2 <= SDL_rect.c [x86_64] Compile : SDL2 <= SDL_shape.c [x86_64] Compile : SDL2 <= SDL_stretch.c [x86_64] Compile : SDL2 <= SDL_surface.c [x86_64] Compile : SDL2 <= SDL_video.c [x86_64] Compile : SDL2 <= SDL_vulkan_utils.c [x86_64] Compile : SDL2 <= SDL_yuv.c [x86_64] Compile : SDL2 <= SDL_androidclipboard.c [x86_64] Compile : SDL2 <= SDL_androidevents.c [x86_64] Compile : SDL2 <= SDL_androidgl.c [x86_64] Compile : SDL2 <= SDL_androidkeyboard.c [x86_64] Compile : SDL2 <= SDL_androidmessagebox.c [x86_64] Compile : SDL2 <= SDL_androidmouse.c [x86_64] Compile : SDL2 <= SDL_androidtouch.c [x86_64] Compile : SDL2 <= SDL_androidvideo.c [x86_64] Compile : SDL2 <= SDL_androidvulkan.c [x86_64] Compile : SDL2 <= SDL_androidwindow.c [x86_64] Compile : SDL2 <= yuv_rgb.c [x86_64] Compile : SDL2 <= SDL_test_assert.c [x86_64] Compile : SDL2 <= SDL_test_common.c [x86_64] Compile : SDL2 <= SDL_test_compare.c [x86_64] Compile : SDL2 <= SDL_test_crc32.c [x86_64] Compile : SDL2 <= SDL_test_font.c [x86_64] Compile : SDL2 <= SDL_test_fuzzer.c [x86_64] Compile : SDL2 <= SDL_test_harness.c [x86_64] Compile : SDL2 <= SDL_test_imageBlit.c [x86_64] Compile : SDL2 <= SDL_test_imageBlitBlend.c [x86_64] Compile : SDL2 <= SDL_test_imageFace.c [x86_64] Compile : SDL2 <= SDL_test_imagePrimitives.c [x86_64] Compile : SDL2 <= SDL_test_imagePrimitivesBlend.c [x86_64] Compile : SDL2 <= SDL_test_log.c [x86_64] Compile : SDL2 <= SDL_test_md5.c [x86_64] Compile : SDL2 <= SDL_test_memory.c [x86_64] Compile : SDL2 <= SDL_test_random.c [x86_64] Compile++ : hidapi <= hid.cpp [x86_64] Prebuilt : libc++_shared.so <= <NDK>/sources/cxx-stl/llvm-libc++/libs/x86_64/ [x86_64] SharedLibrary : libhidapi.so [x86_64] SharedLibrary : libSDL2.so /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/build/intermediates/ndkBuild/debug/obj/local/x86_64/objs-debug/SDL2/src/audio/SDL_audio.o:SDL_audio.c:bootstrap: error: undefined reference to 'openslES_bootstrap' /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/video/android/SDL_androidevents.c:105: error: undefined reference to 'openslES_PauseDevices' /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/video/android/SDL_androidevents.c:112: error: undefined reference to 'openslES_ResumeDevices' /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/video/android/SDL_androidevents.c:156: error: undefined reference to 'openslES_PauseDevices' /Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/src/main/jni/SDL/src/video/android/SDL_androidevents.c:167: error: undefined reference to 'openslES_ResumeDevices' clang++: error: linker command failed with exit code 1 (use -v to see invocation) make: *** [/Users/ing/github/ffmp/SDL2-2.0.10/android-project/app/build/intermediates/ndkBuild/debug/obj/local/x86_64/libSDL2.so] Error 1 ``` 感觉是调用opengl 的相关库时报错,未引用。请教有遇到过此类问题的或者有解决思路的,请不吝赐教。。
如何解决android NDK开发中的NDK_PROJECT_PATH
在编译的过程中会报出的错误,导致程序编译失败 Android NDK: Could not find application project directory ! Android NDK: Please define the NDK_PROJECT_PATH variable to point to it. /Users/****/Downloads/android-ndk-r9c/build/core/build-local.mk:148: *** Android NDK: Aborting . Stop.
Flag android.useDeprecatedNdk
Error:java.lang.RuntimeException: Error: Flag android.useDeprecatedNdk is no longer supported and will be removed in the next version of Android Studio. Please switch to a supported build system. 升级到studio 3.0以后报错。ndk路径也对。 2.3.3是好的
Android Studio的项目运行时报错:Error configuring CMake server
# 问题背景 我在跟着csdn上的一个教程尝试用Android Studio(3.4.1) 做一个变声器的app项目,fmod的so库都导入进项目的libs了 ,build.gradle和cmakelist.txt也都按照那个教程配置了。 [AS制作变声器](https://blog.csdn.net/a_thousand_miles/article/details/81150906 "") 后来报错说不支持armeabi,网上查了下发现NDK17以上都不 支持了,遂下载了ndk16b替换之前的ndk17,ndk的location 也都改过了,然后终于build成功,开心。 但是插上usb准备在手机上运行测试下的时候,出现这个报错 ,Google了也没解决掉。报错:Error configuring CMake server (E:\Android\Sdk\cmake\3.10.2.4988404\bin). ![图片说明](https://img-ask.csdn.net/upload/201909/29/1569748738_97421.png) ** 有大佬知道怎么回事儿吗?** ###代码(build.gradle) ``` apply plugin: 'com.android.application' android { compileSdkVersion 29 buildToolsVersion "29.0.2" defaultConfig { applicationId "com.example.qq_voicechanger01" minSdkVersion 15 targetSdkVersion 29 versionCode 1 versionName "1.0" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" externalNativeBuild { cmake { cppFlags "" abiFilters 'armeabi','x86' } } //编译平台 ndk{ abiFilters "armeabi","x86" } } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } externalNativeBuild { cmake { path "src/main/cpp/CMakeLists.txt" version "3.10.2" } } //目录 sourceSets.main{ jniLibs.srcDirs = ['libs'] jni.srcDirs = [] } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' } ``` ###代码(cmakelist.txt) ``` cmake_minimum_required(VERSION 3.4.1) find_library(log-lib log ) set(my_lib_path ${CMAKE_SOURECE_DIR}/libs) #添加第三方的so库 add_library( libfomd SHARED IMPORTED) #指明第三方so库的绝对路径 set_target_properties( libfmod PROPERTIES IMPORTED_LOCATION ${my_lib_path}/${ANDROID_ABI}/libfmod.so ) add_library( libfmodL SHARED IMPORTED ) set_target_properties( libfmodL PROPERTIES IMPORTED_LOCATION ${my_lib_path}/${ANDROID_ABI}/libfmodL.so ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++11") #添加我们需要编译的cpp绝对路径 add_library( changeVoice SHARED src/main/cpp/play_sound.cpp src/main/cpp/common.cpp src/main/cpp/common_platform.cpp ) #导入路径,使编译时能找到这个文件夹 include_directories(src/main/cpp/inc) #连接好三个路径 target_link_libraries( changeVoice libfmod libfmodL ${log-lib} ) ```
JNI编译c文件时出现问题
E:\Users\admin\Android itheima\12_TwelveClass\01_HelloWorld\jni>ndk-build.cmd Android NDK: Your Android application project path contains spaces: 'E:/Users/admin/ itheima/12_TwelveClass/01_HelloWorld/' Android NDK: The Android NDK build cannot work here. Please move your project to a different location. E:\android-ndk64-r10b-windows-x86_64\android-ndk-r10b\build/core/build-local.mk:155: *** Android NDK: Aborting. . Stop. 有谁能帮忙看吗?急
维护很久前的项目 莫名其妙的导入design
前几天维护一个很久前的项目,想转到安卓x,结果对jar包升级的时候有一个design一直存在,并且报错把jar包转移到新项目中也不会出现这个design 下面贴图![图片说明](https://img-ask.csdn.net/upload/201912/07/1575657133_874940.jpg) apply plugin: 'com.android.application' apply plugin: "findbugs" /*apply from: 'tinker-support.gradle' apply plugin: 'packer'*/ task findbugs(type: FindBugs, dependsOn: 'assembleDebug') { ignoreFailures = true effort = "default" reportLevel = "high" println("$project.buildDir") classes = files("$project.buildDir/intermediates/classes") source = fileTree("src/main/java/") classpath = files() reports { xml.enabled = false html.enabled = true xml { destination file ("$project.buildDir/findbugs.xml") } html { destination file("$project.buildDir/findbugs.html") } } } android { lintOptions { checkReleaseBuilds false abortOnError false } compileSdkVersion 29 buildToolsVersion "29.0.2" sourceSets { main { jniLibs.srcDir 'libs' } // Move the tests to tests/java, tests/res, etc... //instrumentTest.setRoot('tests') // Move the build types to build-types/<type> // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/<type>/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similar customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } defaultConfig { applicationId "com.goodlive.flying" minSdkVersion 21 targetSdkVersion 29 versionCode 20180228 versionName "1.5.9" //versionName "1.5.2"正式版 // Enabling multidex support. multiDexEnabled true ndk { // 设置支持的SO库架构 abiFilters 'armeabi' , 'x86'//, 'armeabi-v7a', 'x86_64', 'arm64-v8a' } } dexOptions { javaMaxHeapSize "4g" } signingConfigs { release { storeFile file('.jks') storePassword "" keyAlias "" keyPassword "" // 满足下面两个条件时需要此配置 // 1. Gradle版本 >= 2.14.1 // 2. Android Gradle Plugin 版本 >= 2.2.0 // 作用是只使用旧版签名,禁用V2版签名模式 v2SigningEnabled false } debug { storeFile file('.jks') storePassword "" keyAlias "" keyPassword "" } } buildTypes { release { //启用混淆配置 //Zip代码压缩优化 // zipAlignEnabled true //移除无用资源 // shrinkResources true // debuggable true //加载默认混淆文件 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } debug { //启用混淆配置 minifyEnabled false //Zip代码压缩优化 // zipAlignEnabled true //移除无用资源 // shrinkResources true //debugs使用release签名 //加载默认混淆文件 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' signingConfig signingConfigs.release } } } dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation project(path: ':PushSDK') implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test:runner:1.2.0' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' // implementation files('libs/SocialSDK_WeiXin_Full.jar') //dagger2 implementation 'com.qianwen:update-app:3.3.3' implementation 'com.lzy.net:okgo:3.0.4' implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.recyclerview:recyclerview:1.1.0' implementation 'androidx.cardview:cardview:1.0.0' implementation ('com.google.android.material:material:1.0.0'){ exclude group: 'com.android.support' } implementation ('com.jakewharton:butterknife:8.1.0'){ exclude group: 'com.android.support' } implementation 'com.android.support:multidex:1.0.3' implementation 'com.mcxiaoke.gradle:packer-helper:1.0.9' implementation ('com.github.bumptech.glide:glide:4.0.0-RC0'){ exclude group: 'com.android.support' } implementation 'com.tencent.bugly:crashreport_upgrade:1.4.2' //w implementation ('com.github.lygttpod:SuperTextView:1.0.7'){ exclude group: 'com.android.support' } implementation 'com.orhanobut:logger:1.15' //w implementation ('com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.13'){ exclude group: 'com.android.support' } implementation 'com.blankj:utilcode:1.3.1' implementation 'cn.finalteam:galleryfinal:1.4.8.7' implementation 'com.google.code.gson:gson:2.8.2' implementation 'org.greenrobot:eventbus:3.0.0' implementation 'com.squareup.okhttp3:okhttp:3.10.0' implementation 'com.roughike:bottom-bar:2.0.2' implementation 'com.squareup.okhttp3:logging-interceptor:3.4.1' implementation 'com.squareup.okhttp3:okhttp-urlconnection:3.4.1' implementation 'io.reactivex:rxandroid:1.2.1' implementation 'io.reactivex:rxjava:1.2.1' implementation 'com.squareup.retrofit2:retrofit:2.1.0' implementation 'com.squareup.retrofit2:adapter-rxjava:2.1.0' implementation 'com.squareup.retrofit2:converter-gson:2.1.0' implementation 'com.trello:rxlifecycle-components:0.6.1' implementation 'com.jakewharton.rxbinding:rxbinding:0.4.0' implementation 'com.jakewharton.rxbinding:rxbinding-appcompat-v7:0.3.0' implementation 'com.jakewharton.rxbinding:rxbinding-design:0.3.0' implementation 'com.facebook.stetho:stetho:1.5.0' implementation 'com.facebook.stetho:stetho-okhttp3:1.5.0' implementation 'com.lsjwzh:materialloadingprogressbar:0.5.8-RELEASE' implementation 'me.shaohui.advancedluban:library:1.3.3' implementation 'com.dinuscxj:recycleritemdecoration:1.0.0' implementation 'com.umeng.analytics:analytics:6.1.4' implementation 'androidx.constraintlayout:constraintlayout:1.1.3' implementation 'com.zhy:flowlayout-lib:1.0.3' implementation 'com.afollestad.material-dialogs:core:0.9.4.5' implementation 'com.google.dagger:dagger:2.11-rc2' implementation 'se.emilsjolander:stickylistheaders:2.7.0' testImplementation 'junit:junit:4.12' implementation 'com.bigkoo:quicksidebar:1.0.3' annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC0' annotationProcessor 'com.jakewharton:butterknife-compiler:8.1.0' annotationProcessor 'com.google.dagger:dagger-compiler:2.11-rc2' implementation 'com.github.razerdp:BasePopup:1.9.1' implementation 'com.makeramen:roundedimageview:2.3.0' implementation("com.github.hotchemi:permissionsdispatcher:3.1.0") { // if you don't use android.app.Fragment you can exclude support for them exclude module: "support-v13" } annotationProcessor "com.github.hotchemi:permissionsdispatcher-processor:3.1.0" } ``` 求助大神啊 ```
cocos2d-x-3.8编译android报错,求大神帮帮忙
创建了一个cocos2d项目,添加了几行代码,在vs2012下运行正常,编译win32也正常,但是一编译android就报错 NDK用android-ndk-r9d和android-ndk-r10两个版本试过,估计不是ndk的原因,其他的原因也想不出来,求大神帮忙解决 这是报错的原文 E:\cocos\fu100>cocos compile -p android -j 4 执行命令:compile 编译模式:debug 使用 Eclipse 工程:E:\cocos\fu100\proj.android 未指定 Android 目标平台版本,自动查找一个可用版本... 正在执行:'"D:\android-sdk\tools\android" update project -t android-10 -p E:\coc os\fu100\proj.android' Updated project.properties Updated local.properties Updated file E:\cocos\fu100\proj.android\proguard-project.txt 未指定 Android 目标平台版本,自动查找一个可用版本... 正在执行:'"D:\android-sdk\tools\android" update lib-project -p E:\cocos\fu100\c ocos2d\cocos\platform\android\java -t android-10' Updated project.properties Updated local.properties Updated file E:\cocos\fu100\cocos2d\cocos\platform\android\java\proguard-project .txt 正在执行 ndk-build... NDK 编译模式:debug NDK_TOOLCHAIN_VERSION: 4.8 正在执行:'"D:\android-ndk-r9d\ndk-build" -C E:\cocos\fu100\proj.android -j4 NDK _MODULE_PATH=E:\cocos\fu100\proj.android\../cocos2d;E:\cocos\fu100\proj.android\ ../cocos2d/cocos;E:\cocos\fu100\proj.android\../cocos2d/external NDK_TOOLCHAIN_V ERSION=4.8 NDK_DEBUG=1' make.exe: Entering directory `E:/cocos/fu100/proj.android' D:/android-ndk-r9d/build/core/build-binary.mk:393: warning: overriding commands for target `obj/local/armeabi/objs-debug/bullet_static/BulletMultiThreaded/SpuLi bspe2Support.o' D:/android-ndk-r9d/build/core/build-binary.mk:393: warning: ignoring old command s for target `obj/local/armeabi/objs-debug/bullet_static/BulletMultiThreaded/Spu Libspe2Support.o' [armeabi] Gdbserver : [arm-linux-androideabi-4.8] libs/armeabi/gdbserver [armeabi] Gdbsetup : libs/armeabi/gdb.setup [armeabi] Compile++ thumb: cocos2dcpp_shared <= main.cpp [armeabi] Compile++ thumb: cocos2dcpp_shared <= AppDelegate.cpp arm-linux-androideabi-g++: error: CreateProcess: No such file or directory [armeabi] Compile++ thumb: cocos2dcpp_shared <= HelloWorldScene.cpp make.exe: *** [obj/local/armeabi/objs-debug/cocos2dcpp_shared/hellocpp/main.o] E rror 1 make.exe: *** Waiting for unfinished jobs.... arm-linux-androideabi-g++: error: CreateProcess: No such file or directory make.exe: *** [obj/local/armeabi/objs-debug/cocos2dcpp_shared/__/__/Classes/AppD elegate.o] Error 1 arm-linux-androideabi-g++: error: CreateProcess: No such file or directory make.exe: *** [obj/local/armeabi/objs-debug/cocos2dcpp_shared/__/__/Classes/Hell oWorldScene.o] Error 1 make.exe: Leaving directory `E:/cocos/fu100/proj.android' 执行命令出错,返回值:2。 ``` 这事新建了一个空的项目,想编译来试试,结果还是报错,求大神帮忙 ``` 正在执行 ndk-build... NDK 编译模式:debug NDK_TOOLCHAIN_VERSION: 4.8 正在执行:'"D:\android-ndk-r9d\ndk-build" -C E:\cocos\test\proj.android -j4 NDK_ MODULE_PATH=E:\cocos\test\proj.android\../cocos2d;E:\cocos\test\proj.android\../ cocos2d/cocos;E:\cocos\test\proj.android\../cocos2d/external NDK_TOOLCHAIN_VERSI ON=4.8 NDK_DEBUG=1' make.exe: Entering directory `E:/cocos/test/proj.android' D:/android-ndk-r9d/build/core/build-binary.mk:393: warning: overriding commands for target `obj/local/armeabi/objs-debug/bullet_static/BulletMultiThreaded/SpuLi bspe2Support.o' D:/android-ndk-r9d/build/core/build-binary.mk:393: warning: ignoring old command s for target `obj/local/armeabi/objs-debug/bullet_static/BulletMultiThreaded/Spu Libspe2Support.o' [armeabi] StaticLibrary : libcocos2d.a [armeabi] Compile++ thumb: cocostudio_static <= WidgetReader.cpp arm-linux-androideabi-g++: error: CreateProcess: No such file or directory make.exe: *** [obj/local/armeabi/objs-debug/cocostudio_static/WidgetReader/Widge tReader.o] Error 1 make.exe: *** Waiting for unfinished jobs.... make.exe: Leaving directory `E:/cocos/test/proj.android' 执行命令出错,返回值:2。 ``` ```
android ndk(r16版本)安装后build apk报错
![图片说明](https://img-ask.csdn.net/upload/201712/07/1512619800_839640.png) Error:(81) Android NDK: Application targets deprecated ABI(s): mips64 armeabi mips Error:(82) Android NDK: Support for these ABIs will be removed in a future NDK release
新手错误Error:Execution failed for task
今天弄了一个直播sdk下来测试,在新创建的一个空项目里引入了sdk包,没想到更新完gradle,就报出了这个错误,完整如下: Error:Execution failed for task ':app:processDebugManifest'. > Manifest merger failed with multiple errors, see logs 还有相关的信息提示:Information:Gradle tasks [clean, :app:generateDebugSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies, :app:generateDebugAndroidTestSources, :liveRtmpPushSDK:generateDebugSources, :liveRtmpPushSDK:generateDebugAndroidTestSources, :liveRtmpPushSDK:mockableAndroidJar, :liveRtmpPushSDK:prepareDebugUnitTestDependencies] 以下是空项目的build.gradle信息: apply plugin: 'com.android.application' android { compileSdkVersion 25 buildToolsVersion "26.0.1" defaultConfig { applicationId "com.example.lin.videotest" minSdkVersion 15 targetSdkVersion 25 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } } dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.android.support.constraint:constraint-layout:1.0.2' testCompile 'junit:junit:4.12' compile project(':liveRtmpPushSDK') } 如下是直播sdk的build.gradle信息 apply plugin: 'com.android.library' android { compileSdkVersion 19 buildToolsVersion '25.0.0' defaultConfig { minSdkVersion 19 targetSdkVersion 19 // ndk { // moduleName "fdk-aac" // cFlags "-IE:/AS_code/LiveRtmpPushSDKDemo/liveRtmpPushSDK/src/main/jni -IE:/AS_code/LiveRtmpPushSDKDemo/liveRtmpPushSDK/src/main/jni/include -IE:/AS_code/LiveRtmpPushSDKDemo/liveRtmpPushSDK/src/main/jni/svc" // ldLibs "log", "z", "stdc++" // } } sourceSets.main { jni.srcDirs = [] jniLibs.srcDir 'src/main/libs' } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } } dependencies { compile 'com.android.support:support-v4:18.0.0' }
Eclipse中的NDKr8,调试jni代码
按照http://tools.android.com/recent/usingthendkplugin配置好NDK的调试环境后,也可以对CPP代码进行提示编写了,但在进行调试的时候,点击Debug as android Native application后,报如下错误?请问各位大神,什么情况啊?怎么解决? (no debugging symbols found) Error while mapping shared library sections:/system/bin/linker: No such file or directory. Error while mapping shared library sections:libstdc++.so: No such file or directory. Error while mapping shared library sections:libm.so: No such file or directory. Error while mapping shared library sections: liblog.so: No such file or directory. Error while mapping shared library sections: libcutils.so: No such file or directory. Error while mapping shared library sections: libz.so: No such file or directory. Error while mapping shared library sections: libutils.so: No such file or directory. Error while mapping shared library sections: libbinder.so: No such file or directory. Error while mapping shared library sections: libexpat.so: No such file or directory. Error while mapping shared library sections: libcrypto.so: No such file or directory. Error while mapping shared library sections: libgabi++.so: No such file or directory. Error while mapping shared library sections: libicuuc.so: No such file or directory. Error while mapping shared library sections: libicui18n.so: No such file or directory. Error while mapping shared library sections: libssl.so: No such file or directory. Error while mapping shared library sections: libstlport.so: No such file or directory. Error while mapping shared library sections: libnativehelper.so: No such file or directory. Error while mapping shared library sections: libnetutils.so: No such file or directory. Error while mapping shared library sections: libGLESv2_dbg.so: No such file or directory. Error while mapping shared library sections: libEGL.so: No such file or directory. Error while mapping shared library sections: libwpa_client.so: No such file or directory. Error while mapping shared library sections: libhardware_legacy.so: No such file or directory. Error while mapping shared library sections: libpixelflinger.so: No such file or directory. Error while mapping shared library sections: libhardware.so: No such file or directory. Error while mapping shared library sections: libemoji.so: No such file or directory. Error while mapping shared library sections: libjpeg.so: No such file or directory. Error while mapping shared library sections: libsecnativefeature.so: No such file or directory. Error while mapping shared library sections: libharfbuzz.so: No such file or directory. Error while mapping shared library sections: libquramimagecodec.so: No such file or directory. Error while mapping shared library sections: libskia.so: No such file or directory. Error while mapping shared library sections: libui.so: No such file or directory. Error while mapping shared library sections: libGLESv2.so: No such file or directory. Error while mapping shared library sections: libremotedesktop_client.so: No such file or directory. Error while mapping shared library sections: libgui.so: No such file or directory. Error while mapping shared library sections: libcamera_client.so: No such file or directory. Error while mapping shared library sections: libsqlite.so: No such file or directory. Error while mapping shared library sections: libdvm.so: No such file or directory. Error while mapping shared library sections: libGLESv1_CM.so: No such file or directory. Error while mapping shared library sections: libETC1.so: No such file or directory. Error while mapping shared library sections: libsisodrm.so: No such file or directory. Error while mapping shared library sections: libsonivox.so: No such file or directory. Error while mapping shared library sections: libstagefright_foundation.so: No such file or directory. Error while mapping shared library sections: libmedia.so: No such file or directory. Error while mapping shared library sections: libsensor_yamaha_test.so: No such file or directory. Error while mapping shared library sections: libnfc_ndef.so: No such file or directory. Error while mapping shared library sections: libusbhost.so: No such file or directory. Error while mapping shared library sections: libQmageDecoder.so: No such file or directory. Error while mapping shared library sections: libhwui.so: No such file or directory. Error while mapping shared library sections: libbluedroid.so: No such file or directory. Error while mapping shared library sections: libdbus.so: No such file or directory. Error while mapping shared library sections: libandroid_runtime.so: No such file or directory. Error while mapping shared library sections: libvorbisidec.so: No such file or directory. Error while mapping shared library sections: libstagefright_yuv.so: No such file or directory. Error while mapping shared library sections: libdrmframework.so: No such file or directory. Error while mapping shared library sections: libchromium_net.so: No such file or directory. Error while mapping shared library sections: libstagefright_amrnb_common.so: No such file or directory. Error while mapping shared library sections: libstagefright_enc_common.so: No such file or directory. Error while mapping shared library sections: libstagefright_avc_common.so: No such file or directory. Error while mapping shared library sections: libsavscmn.so: No such file or directory. Error while mapping shared library sections: libsavsff.so: No such file or directory. Error while mapping shared library sections: libstagefright.so: No such file or directory. Error while mapping shared library sections: libmtp.so: No such file or directory. Error while mapping shared library sections: libexif.so: No such file or directory. Error while mapping shared library sections: libmedia_jni.so: No such file or directory. Error while mapping shared library sections: libbcc.so: No such file or directory. Error while mapping shared library sections: libbcinfo.so: No such file or directory. Error while mapping shared library sections: libRS.so: No such file or directory. Error while mapping shared library sections: librs_jni.so: No such file or directory. Error while mapping shared library sections: libandroid.so: No such file or directory. Error while mapping shared library sections: libwebcore.so: No such file or directory. Error while mapping shared library sections: libsrv_um.so: No such file or directory. Error while mapping shared library sections: libpvr2d.so: No such file or directory. Error while mapping shared library sections: gralloc.omap4.so: No such file or directory. (no debugging symbols found) warning: Unable to find dynamic linker breakpoint function. GDB will be unable to debug shared library initializers and track explicitly loaded dynamic code. warning: shared library handler failed to enable breakpoint No symbol table is loaded. Use the "file" command. [Switching to Thread 26481] Cannot find bounds of current function Quit (expect signal SIGINT when the program is resumed)
请教大神帮忙解决一下eclipse里面android_NDK编译.c文件报错
"D:\\Android\\android-ndk-r9d\\ndk-build.cmd" all 系统找不到指定的文件。 [armeabi-v7a] Compile thumb : hello-jni <= hello-jni.c jni/hello-jni.c:31:1: fatal error: opening dependency file ./obj/local/armeabi-v7a/objs/hello-jni/hello-jni.o.d: No such file or directory compilation terminated. make.exe: *** [obj/local/armeabi-v7a/objs/hello-jni/hello-jni.o] Error 1 19:06:20 Build Finished (took 2s.346ms) 我实在是不知道为什么会报找不到文件,新手,刚接触NDK,求好心人解答,万分感激. 370361737,可以远程帮我. 这是android.mk: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := hello-jni LOCAL_SRC_FILES := hello-jni.c include $(BUILD_SHARED_LIBRARY) 这application.mk: APP_ABI := all 把ndk改r8的就可以了,虽然有点小问题,但可以跑了,r10就不可以,这是什么问题呢?eclipse版本问题吗?还是哪里没设置对?我是一模一样的配的。 公司电脑还是xp的,家里装win7的 r8生成的.so文件在obj目录下,拖到lib就可以运行,正常,r10的任何目录都找不到.so文件
cocos2d-x移植到安卓 编译时error:sys/syslimits.h:No such file
cygwin下执行./build_native.sh后的错误代码: D:/android-ndk-r8b/platforms/android-8/arch-arm/usr/include/limits.h:89:27: fatal error: sys/syslimits.h: No such file or directory 我查找对应usr/include/sys/下确实没有syslimits.h文件,下了r8b,r8e,r9b版本的NDK对应目录都没有syslimits.h。 我的开发环境:cygwin,win7,ndk r8b,JDK 1.7 求助怎么回事?纠结好几天了 求大神解释下~~
android stadio ndk问题
Error:Execution failed for task ':mylibrary:compileDebugNdk'. > Error: NDK integration is deprecated in the current plugin. Consider trying the new experimental plugin. For details, see http://tools.android.com/tech-docs/new-build-system/gradle-experimental. Set "android.useDeprecatedNdk=true" in gradle.properties to continue using the current NDK integration. 在配置ndk build c文件的时候报的
eclipse开发c++项目遇到的问题
**** Clean-only build of configuration Default for project ccc **** E:\android-ndk-r10\ndk-build.cmd clean Android NDK: Could not find application project directory ! E:\android-ndk-r10\build/core/build-local.mk:148: *** Android NDK: Aborting . Stop. Android NDK: Please define the NDK_PROJECT_PATH variable to point to it. **** Build Finished **** 求指导怎么回事,代码什么的都没问题,但是build的时候出问题了
AndroidStudio中开发ndk报错,求助!!!
``` D:\workspaces\AndroidProjects\GISpeech\app\src\main\jni\HTKLib\excpt.h:20:21: fatal error: crtdefs.h: No such file or directory #include <crtdefs.h> ``` as 的项目中使用ndk 开发,其中有些 c 文件中引用了一些 系统平台下的 h 文件,在 vs2010 中可以调通,但是加入到 jni 中就报错,请问怎么解决??
报错ndk-build.cmdfinished with non-zero exit value 2
请问大神,Error:Execution failed for task ':libuvccamera:ndkBuild'. > Process 'command 'D:\work\ndk\android-ndk-r13b/ndk-build.cmd'' finished with non-zero exit value 2这个如何解决,谢谢
编译ndk-build.cmd生成.so文件中出现这样的问题,不知道哪的原因。
E:\project\CHENWEN\proj.android\jni>ndk-build [armeabi] Compile++ thumb: cocos2dcpp_shared <= main.cpp In file included from D:/android-ndk-r10/sources/cxx-stl/gnu-libstdc++/4.6/inclu de/thread:35:0, from E:/project/CHENWEN/proj.android//jni/../../cocos2d/cocos/3 d/../base/CCConsole.h:42, from E:/project/CHENWEN/proj.android//jni/../../cocos2d/cocos/3 d/../base/ccMacros.h:35, from E:/project/CHENWEN/proj.android//jni/../../cocos2d/cocos/3 d/../base/CCRefPtr.h:30, from E:/project/CHENWEN/proj.android//jni/../../cocos2d/cocos/3 d/../cocos2d.h:42, from E:/project/CHENWEN/proj.android//jni/../../Classes/AppDele gate.h:4, from E:/project/CHENWEN/proj.android//jni/hellocpp/main.cpp:1: D:/android-ndk-r10/sources/cxx-stl/gnu-libstdc++/4.6/include/bits/c++0x_warning. h:32:2: error: #error This file requires compiler and library support for the IS O C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options. In file included from E:/project/CHENWEN/proj.android//jni/../../cocos2d/cocos/3 d/../platform/CCGL.h:36:0, from E:/project/CHENWEN/proj.android//jni/../../cocos2d/cocos/3 d/../base/ccTypes.h:36, from E:/project/CHENWEN/proj.android//jni/../../cocos2d/cocos/3 d/../cocos2d.h:51, from E:/project/CHENWEN/proj.android//jni/../../Classes/AppDele gate.h:4, from E:/project/CHENWEN/proj.android//jni/hellocpp/main.cpp:1: E:/project/CHENWEN/proj.android//jni/../../cocos2d/cocos/3d/../platform/android/ CCGL-android.h:44:31: fatal error: GLES2/gl2platform.h: No such file or director y compilation terminated. make.exe: *** [E:/project/CHENWEN/proj.android//obj/local/armeabi/objs/cocos2dcp p_shared/hellocpp/main.o] Error 1
NDK开发的时候遇到error: undefined reference to 错误
大家好,我在正在将C++的一些代码通过ndk调用到android项目里面去,但是在出现了一个很奇怪的错误; /bin/ld: ./obj/local/armeabi/objs/TestNDK2/TestNDK2.o: in function Java_com_example_testndk2_MainActivity_stringTestNdk(_JNIEnv*, _jobject*):jni/TestNDK2.cpp:15: error: undefined reference to 'CFeatureExtract::CFeatureExtract()' collect2: ld returned 1 exit status make: *** [obj/local/armeabi/libTestNDK2.so] Error 1 我调用jni的文件代码为: #include <string.h> #include "FeatureExtract.h" #include "Output.h" #include <jni.h> jstring Java_com_example_testndk2_MainActivity_stringTestNdk( JNIEnv* env, jobject thiz ) { COutput * pout; pout = new COutput(); CFeatureExtract *pFtr; pFtr=new CFeatureExtract(); return (env)->NewStringUTF("Hello from JNI and anbo !"); } mk文件也编写好了,应该没什么问题,之所以说没问题是因为,我在上面调用了其他cpp文件的 output.cpp和FeatureExtract.cpp等好几个cpp文件,当我把 pFtr=new CFeatureExtract(); 这行去掉的时候,会发现不再报错。下面是我的mk的代码: LOCAL_PATH := $(call my-dir) include $(CLEAR_VARS) LOCAL_MODULE := libFeatureExtract LOCAL_SRC_FILES := OnlineFtr.cpp OnlineNorm.cpp FeatureExtract.cpp LOCAL_C_INCLUDES := $(LOCAL_PATH)/include include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := libOutput LOCAL_SRC_FILES := LQDFR.cpp Classifier.cpp Output.cpp include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := TestNDK2 LOCAL_SRC_FILES := TestNDK2.cpp LOCAL_STATIC_LIBRARIES := libFeatureExtract LOCAL_STATIC_LIBRARIES := libOutput include $(BUILD_SHARED_LIBRARY) 最后是我CFeatureExtract构造函数的代码: CFeatureExtract::CFeatureExtract() { nmdir = 0; nwid = zone*zstep; pNorm = new COnlineNorm; pFeatr = new COnlineFtr( nwid ); //edit by anbo trajnorm = NULL; new_ptnum =0; new_ptnum_total=0; strokeEnd=0; strokeBegin=0; countStroke=0; GaussModel_probability =0; } 下面是.h头文件的部分声明 class CFeatureExtract{ public: CFeatureExtract(); ~CFeatureExtract(); 非常想知道到底哪里错了啊!感谢!
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载 点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。 ...
字节跳动视频编解码面经
三四月份投了字节跳动的实习(图形图像岗位),然后hr打电话过来问了一下会不会opengl,c++,shador,当时只会一点c++,其他两个都不会,也就直接被拒了。 七月初内推了字节跳动的提前批,因为内推没有具体的岗位,hr又打电话问要不要考虑一下图形图像岗,我说实习投过这个岗位不合适,不会opengl和shador,然后hr就说秋招更看重基础。我当时想着能进去就不错了,管他哪个岗呢,就同意了面试...
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
Python 基础(一):入门必备知识
Python 入门必备知识,你都掌握了吗?
兼职程序员一般可以从什么平台接私活?
这个问题我进行了系统性的总结,以下将进行言简意赅的说明和渠道提供,希望对各位小猿/小媛们有帮助~ 根据我们的经验,程序员兼职主要分为三种:兼职职位众包、项目整包和自由职业者驻场。 所谓的兼职职位众包,指的是需求方这边有自有工程师配合,只需要某个职位的工程师开发某个模块的项目。比如开发一个 app,后端接口有人开发,但是缺少 iOS 前端开发工程师,那么他们就会发布一个职位招聘前端,来配合公司一...
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...
写了很久,这是一份最适合/贴切普通大众/科班/非科班的『学习路线』
说实话,对于学习路线这种文章我一般是不写的,大家看我的文章也知道,我是很少写建议别人怎么样怎么样的文章,更多的是,写自己的真实经历,然后供大家去参考,这样子,我内心也比较踏实,也不怕误导他人。 但是,最近好多人问我学习路线,而且很多大一大二的,说自己很迷茫,看到我那篇 普普通通,我的三年大学 之后很受激励,觉得自己也能行,(是的,别太浪,你一定能行)希望我能给他个学习路线,说...
经典算法(5)杨辉三角
写在前面: 我是 扬帆向海,这个昵称来源于我的名字以及女朋友的名字。我热爱技术、热爱开源、热爱编程。技术是开源的、知识是共享的。 这博客是对自己学习的一点点总结及记录,如果您对 Java、算法 感兴趣,可以关注我的动态,我们一起学习。 用知识改变命运,让我们的家人过上更好的生活。 目录一、杨辉三角的介绍二、杨辉三角的算法思想三、代码实现1.第一种写法2.第二种写法 一、杨辉三角的介绍 百度
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看...
SQL-小白最佳入门sql查询一
不要偷偷的查询我的个人资料,即使你再喜欢我,也不要这样,真的不好;
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,
程序员:我终于知道post和get的区别
IT界知名的程序员曾说:对于那些月薪三万以下,自称IT工程师的码农们,其实我们从来没有把他们归为我们IT工程师的队伍。他们虽然总是以IT工程师自居,但只是他们一厢情愿罢了。 此话一出,不知激起了多少(码农)程序员的愤怒,却又无可奈何,于是码农问程序员。 码农:你知道get和post请求到底有什么区别? 程序员:你看这篇就知道了。 码农:你月薪三万了? 程序员:嗯。 码农:你是怎么做到的? 程序员:
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI 算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车? 某胡同口的煎饼摊一年能卖出多少个煎饼? 深圳有多少个产品经理? 一辆公交车里能装下多少个乒乓球? 一
碎片化的时代,如何学习
今天周末,和大家聊聊学习这件事情。 在如今这个社会,我们的时间被各类 APP 撕的粉碎。 刷知乎、刷微博、刷朋友圈; 看论坛、看博客、看公号; 等等形形色色的信息和知识获取方式一个都不错过。 貌似学了很多,但是却感觉没什么用。 要解决上面这些问题,首先要分清楚一点,什么是信息,什么是知识。 那什么是信息呢? 你一切听到的、看到的,都是信息,比如微博上的明星出轨、微信中的表情大战、抖音上的...
so easy! 10行代码写个"狗屁不通"文章生成器
前几天,GitHub 有个开源项目特别火,只要输入标题就可以生成一篇长长的文章。 背后实现代码一定很复杂吧,里面一定有很多高深莫测的机器学习等复杂算法 不过,当我看了源代码之后 这程序不到50行 尽管我有多年的Python经验,但我竟然一时也没有看懂 当然啦,原作者也说了,这个代码也是在无聊中诞生的,平时撸码是不写中文变量名的, 中文...
知乎高赞:中国有什么拿得出手的开源软件产品?(整理自本人原创回答)
知乎高赞:中国有什么拿得出手的开源软件产品? 在知乎上,有个问题问“中国有什么拿得出手的开源软件产品(在 GitHub 等社区受欢迎度较好的)?” 事实上,还不少呢~ 本人于2019.7.6进行了较为全面的回答,对这些受欢迎的 Github 开源项目分类整理如下: 分布式计算、云平台相关工具类 1.SkyWalking,作者吴晟、刘浩杨 等等 仓库地址: apache/skywalking 更...
相关热词 c# plc s1200 c#里氏转换原则 c# 主界面 c# do loop c#存为组套 模板 c# 停掉协程 c# rgb 读取图片 c# 图片颜色调整 最快 c#多张图片上传 c#密封类与密封方法
立即提问