I have a simple app in which I am using openssl for some encryption. but I am getting white screen on launch of app for than 5 seconds.
Here is my gradle:
apply plugin: 'com.android.application'
android {
signingConfigs {
config {
keyAlias 'manvish'
keyPassword 'manvish'
storeFile file('/home/manvish/Android/debug.keystore')
storePassword '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
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
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.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('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'
}
}
Have a look at Android.mk:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := ssl_static
LOCAL_SRC_FILES := precompiled/libssl.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := crypto_static
LOCAL_SRC_FILES :=precompiled/libcrypto.a
include $(PREBUILT_STATIC_LIBRARY)
include $(CLEAR_VARS)
LOCAL_MODULE := myLibrary
TARGET_PLATFORM := android-3
LOCAL_SRC_FILES := native-lib.cpp
LOCAL_C_INCLUDES = $(LOCAL_PATH)/include
LOCAL_STATIC_LIBRARIES := ssl_static crypto_static
LOCAL_LDLIBS := -llog
include $(BUILD_SHARED_LIBRARY)
I am not getting the reason behind white screen, some of SO answers suggesting to use this in theme:
<item name="android:windowDisablePreview">true</item>
but I don't want to use this. It is not a proper solution because it avoid white screen but still the delay of loading app is same.please help to solve this.