Skip to main content
edited title
Source Link
Aavaas
  • 807
  • 2
  • 8
  • 16

Android Studio NDK workaround (where are the shared object .so files)

I am trying to integrate the NDK project where Android Studio tells me I can have a workaround by:

Warning: Native C/C++ source code is found, but it seems that NDK option is not configured. Note that if you have an Android.mk, it is not used for compilation. The recommended workaround is to remove the default jni source code directory by adding:

android {
    sourceSets {
        main {
            jni.srcDirs = []
    }
} } 

to build.gradle, manually compile the code with ndk-build, and then place the resulting shared object in src/main/jniLibs

so after my ndk build, i find that there are two places where I can find .so files in armeabi-v7a,mips and x86 folders

/libs
/obj/local

so which folders from above two contain the actual .so files to be copied?so which folders from above two contain the actual .so files to be copied?

And do I have to configure anything else to make this work? I imported the project via Android Studio's import ADT method. Thank you!

Android Studio NDK workaround (where are the shared object .so files)

I am trying to integrate the NDK project where Android Studio tells me I can have a workaround by:

Warning: Native C/C++ source code is found, but it seems that NDK option is not configured. Note that if you have an Android.mk, it is not used for compilation. The recommended workaround is to remove the default jni source code directory by adding:

android {
    sourceSets {
        main {
            jni.srcDirs = []
    }
} } 

to build.gradle, manually compile the code with ndk-build, and then place the resulting shared object in src/main/jniLibs

so after my ndk build, i find that there are two places where I can find .so files in armeabi-v7a,mips and x86 folders

/libs
/obj/local

so which folders from above two contain the actual .so files to be copied?

And do I have to configure anything else to make this work? I imported the project via Android Studio's import ADT method. Thank you!

Android Studio NDK workaround

I am trying to integrate the NDK project where Android Studio tells me I can have a workaround by:

Warning: Native C/C++ source code is found, but it seems that NDK option is not configured. Note that if you have an Android.mk, it is not used for compilation. The recommended workaround is to remove the default jni source code directory by adding:

android {
    sourceSets {
        main {
            jni.srcDirs = []
    }
} } 

to build.gradle, manually compile the code with ndk-build, and then place the resulting shared object in src/main/jniLibs

so after my ndk build, i find that there are two places where I can find .so files in armeabi-v7a,mips and x86 folders

/libs
/obj/local

so which folders from above two contain the actual .so files to be copied?

And do I have to configure anything else to make this work? I imported the project via Android Studio's import ADT method. Thank you!

edited body
Source Link
Aavaas
  • 807
  • 2
  • 8
  • 16

I am trying to integrate the NDK project where Android Studio tells me I can have a workaround by:

Warning: Native C/C++ source code is found, but it seems that NDK option is not configured. Note that if you have an Android.mk, it is not used for compilation. The recommended workaround is to remove the default jni source code directory by adding:

android {
    sourceSets {
        main {
            jni.srcDirs = []
    }
} } 

to build.gradle, manually compile the code with ndk-build, and then place the resulting shared object in src/main/jniLibs

so after my ndk build, i find that there are two places where I can find .so files in armeabi-v7a,mips and x86 folders

/libs
/obj/local

so which folders from above two containscontain the actual .so files to be copied?

andAnd do iI have to configure anything else to make this work? I imported the project via Android Studio's import ADT method. Thank you!

I am trying to integrate the NDK project where Android Studio tells me I can have a workaround by:

Warning: Native C/C++ source code is found, but it seems that NDK option is not configured. Note that if you have an Android.mk, it is not used for compilation. The recommended workaround is to remove the default jni source code directory by adding:

android {
    sourceSets {
        main {
            jni.srcDirs = []
    }
} } 

to build.gradle, manually compile the code with ndk-build, and then place the resulting shared object in src/main/jniLibs

so after my ndk build, i find that there are two places where I can find .so files in armeabi-v7a,mips and x86 folders

/libs
/obj/local

so which folders from above two contains the actual .so files to be copied?

and do i have to configure anything else to make this work? I imported the project via Android Studio's import ADT method. Thank you!

I am trying to integrate the NDK project where Android Studio tells me I can have a workaround by:

Warning: Native C/C++ source code is found, but it seems that NDK option is not configured. Note that if you have an Android.mk, it is not used for compilation. The recommended workaround is to remove the default jni source code directory by adding:

android {
    sourceSets {
        main {
            jni.srcDirs = []
    }
} } 

to build.gradle, manually compile the code with ndk-build, and then place the resulting shared object in src/main/jniLibs

so after my ndk build, i find that there are two places where I can find .so files in armeabi-v7a,mips and x86 folders

/libs
/obj/local

so which folders from above two contain the actual .so files to be copied?

And do I have to configure anything else to make this work? I imported the project via Android Studio's import ADT method. Thank you!

Source Link
Aavaas
  • 807
  • 2
  • 8
  • 16

Android Studio NDK workaround (where are the shared object .so files)

I am trying to integrate the NDK project where Android Studio tells me I can have a workaround by:

Warning: Native C/C++ source code is found, but it seems that NDK option is not configured. Note that if you have an Android.mk, it is not used for compilation. The recommended workaround is to remove the default jni source code directory by adding:

android {
    sourceSets {
        main {
            jni.srcDirs = []
    }
} } 

to build.gradle, manually compile the code with ndk-build, and then place the resulting shared object in src/main/jniLibs

so after my ndk build, i find that there are two places where I can find .so files in armeabi-v7a,mips and x86 folders

/libs
/obj/local

so which folders from above two contains the actual .so files to be copied?

and do i have to configure anything else to make this work? I imported the project via Android Studio's import ADT method. Thank you!