I am using preBuilt library of OpenSSL in project but i am getting error as:
Error:(62, 11) fatal error: 'openssl/asn1.h' file not found
Error:(62, 11) fatal error: 'openssl/asn1.h' file not found
and my Android.mk file is here
Android.mk
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := myLibrary
TARGET_PLATFORM := android-3
LOCAL_SRC_FILES := native-lib.cpp
LOCAL_C_INCLUDES = $(LOCAL_PATH)/src/main/jni/include/openssl
LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY)
getting error in rss.h
headers of rsa.h
# include <openssl/asn1.h>
# ifndef OPENSSL_NO_BIO
# include <openssl/bio.h>
# endif
# include <openssl/crypto.h>
# include <openssl/ossl_typ.h>
# ifndef OPENSSL_NO_DEPRECATED
# include <openssl/bn.h>
# endif
the error here is cannot find OpenSSL
build.graddle
apply plugin: 'com.android.application'
android {
signingConfigs {
config {
keyAlias 'manvish'
}
}
compileSdkVersion 25
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.example.manvish.bwssb"
minSdkVersion 19
targetSdkVersion 25
versionCode 1
versionName "1.0"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
ndk {
moduleName "myLibrary"
}
}
buildTypes {
release {
shrinkResources false
minifyEnabled true
zipAlignEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro'
signingConfig signingConfigs.config
debuggable true
}
debug {
shrinkResources false
minifyEnabled true
zipAlignEnabled true
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'),
'proguard-rules.pro'
signingConfig signingConfigs.config
debuggable true
}
}
}
android {
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
}
}
android {
defaultConfig {
ndk {
moduleName "myLibrary"
ldLibs "log"
}
}
externalNativeBuild {
ndkBuild {
path 'src/main/jni/Android.mk'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
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:support-vector-drawable:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'xyz.danoz:recyclerviewfastscroller:0.1.3'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:25.3.1'
testCompile 'junit:junit:4.12'
compile files('libs/MorphoSmart_SDK_6.13.2.0-4.1.jar')
// compile 'com.google.android.gms:play-services-location:11.0.4'
// compile 'com.google.android.gms:play-services-maps:11.0.4'
compile files('libs/commons-io-2.4.jar')
compile files('libs/core.jar')
compile('org.apache.httpcomponents:httpmime:4.3') {
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
compile('org.apache.httpcomponents:httpcore:4.4.1') {
exclude group: 'org.apache.httpcomponents', module: 'httpclient'
}
compile 'com.google.code.gson:gson:2.7'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile files('libs/zip4j_1.3.2.jar')
compile files('libs/idkit.jar')
compile files('libs/jna-4.0.0.jar')
compile 'org.apache.commons:commons-lang3:3.6'
compile 'com.github.bumptech.glide:glide:3.7.0'
}
I have added .so files in appropriate folders. its been four days I am not able to fix this.
please help me guys.