Huvle SDK Integration Error1. Library Path Error2. Eclipse dx.jar Error3. JNI Error3-1. JNI DETECTED ERROR3-1-1. Proguard Setup3-2. FATAL EXCEPTION3-3. Other Errors4. MultiDex Error5. Lint option Error6. Huvle Approval Window Error7. Other Errors
If you import Huvle SDK Library correctly as Module Import but
AndroidManifest.xml
or MainActivity
can't refer Huvle SDK, you
must set the path of jar
file which is used inside Huvle SDK
1-1. Huvle SDK Library Path Setup
Set the path of jar
file which is used inside Huvle SDK from
dependencies
area ofbuild.gradle(Module:app) file
Example Library Path
Setup[build.gradle(Module:app)/dependencies
]
x...
dependencies {
...
//-- include project path/lib
implementation fileTree(dir: '../Stealthaddplatformbrowser_lib_sw_3.0.17/libs', include: ['*.jar'])
implementation project(path: ':Stealthaddplatformbrowser_lib_sw_3.0.17')
...
}
...
You must set the Library Path as suitable for your app's folder structure and Library version
When you integrate with Huvle SDK Library by usingEclipse IDE
and build the app
but below error message occurs, you must modify build-tools
version info
Error Message
Failed to load E:\IDE\eclipse_sdk\Android\sdk\build-tools\27.0.3\lib\dx.jar
Unable to build: the file dx.jar was not loaded from the SDK folder.
To solve it, please set build-tools
version info of
project.properties
file as 25.0.3
project.properties
file path
Example Code[project.properties
]
...
sdk.buildtools=25.0.3
...
If your app project uses proguard but don't make Huvle Library be the exception, there
might be JNI DETECTED ERROR
as below
Error Message
...
JNI DETECTED ERROR IN APPLICATION:
JNI NewGlobalRef called with pending exception
java.lang.NoSuchMethodError: no static or non-static
method "Lcom/byappsoft/sap/utils/Sap_Func;.setActionsR()V"
...
If you use proguard in your app project, please make Huvle SDK in the proguard-rules.pro
file be the exception as below
Example Code[proguard-rules.pro
]
...
-keep class com.byappsoft.sap.**{*;}
...
If the FATAL EXCEPTION
occurs and Native fucntion used inside Huvle Library can't
be found, there might be the error message as below
When Huvle Library project's .so
file name and your app project's .so
file name are same, there might be FATAL EXCEPTION
Error Message
...
FATAL EXCEPTION: main
java.lang.UnstisfiedLinkError: No implemtation found for byte[]
com.byappsoft.sap.utils.Sap_Func.getKeySec(byte[], int)
...
Please check whether your app project's .so
file name and .so
file name used inside Huvle SDK(libnative-huvle-lib.so
) are same or not
If they are same, .so
file name used inside Huvle SDK can't be built
normally so that there might be the error
Because Overwrite Error occurred below
3.0.17
version, We modified.so
file name ashuvle
included
Old File Name
:libnative-lib.so
New File Name
:libnative-huvle-lib.so
When the .so
file of JniLibs
folder in Huvle Library Project isn't
loaded correctly, various errors might occurs
If the error related JNI occurs, you should check whether .so
files of jniLibs
folder is loaded correctly or not
When you face the error regarding NDK so that can't solve it, Please contact the person in charge
If your app project integrate with multiple libraries, because the app’s size has been larger, the Build Error might occur
Error Message
trouble writing output:
Too many field references: 131000; max is 65536.
You may try using --multi-dex option.
This build error can occur when one app uses many Methods
that are more than
66536(64K)
. You can solve the error by setting the Multidex
as
below
Multidex Setup
multiDexEnabled
property of defulatConfig
property in
build.gradle(Module:app)
file as true
Example Code [build.gradle(Module:app
]
android {
...
defaultConfig {
...
multiDexEnabled true
...
}
...
}
multidex
library in dependencies
of build.gradle(Module:app)
file
Example Code [build.gradle(Module:app
]
...
dependencies {
//-- Change the library version name into latest version name
implementation 'com.android.support:multidex:1.0.3'
}
...
Class
inherited MultiDexApplication
. After creating
the class, Override
the attachBaseContext( )
method to call
MultiDex.install( )
method
If you already have class inherited
Application
, just changeextends
info of the class intoMultiDexApplication
Example Code
public class MyApplication extends MultiDexApplication {
...
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
MultiDex.install(this);
}
...
}
Class
inherited MultiDexApplication
in <application>
property of AndroidManifest.xml
file
Example Code [AndroidManifest.xml
]
...
<application
...
android:name="com.sample.multidextest.MyApplication"
...
>
</application>
...
If the Lint Optin
Error occurs after integrated with Huvle library and then
built APK as release version, please add lintOptions
construct into build.gradle(Module:app)
file and then set abortOnError
property as false
Example [build.gradle(Module:app
]
android {
...
// This is important, it will run lint checks but won't abort build
lintOptions {
abortOnError false
}
...
}
When the language used inside Huvle Library and your app's language are different,
Lint Option
Error might occurHuvle Library supports
English(Defualt)
,Korean
,Chinese
,Vietnamese
,Japenese
Because Sap_act_main_launcher.class
is provided asjava
file format,
App owner can modify the source and check the Log history. If Huvle
Approval Window isn't outputted correctly, please check whether the initsapStart(
)
method is called correctly as below
Example Code
public class Sap_act_main_launcher{
public static void initsapStart(...) {
...
Log.d("HUVLE", "Calling initsapStart method ");
...
}
}
If the initsapStart( ) method isn't called correctly
When you have difficulties to integrate with Huvle Library, You must check if there is omitted info of your app project after downloaded sample app and checked sample app's setup info
Most of integration errors is related gradle setup info. Please check whether the gradle setup info is correct or not
If you can't solve the error even refer the Solve the Error page, Please contact person in charge
- E-mail (mchama@huvle.com)