Issue in Rhino API, after integrating progaurd

77 views
Skip to first unread message

rahul...@gmail.com

unread,
Feb 26, 2014, 10:19:28 AM2/26/14
to
After integrating Progaurd in Android, I'm facing issue with Rhino API.

Without progaurd, below code in working fine.

org.mozilla.javascript.Context context = org.mozilla.javascript.Context.enter();

context.setOptimizationLevel(-1);

ScriptableObject scope = context.initStandardObjects();

try {

InputStream inputStream = mContext.getAssets().open(JAVASCRIPT_FILE);

InputStreamReader reader = new InputStreamReader(inputStream);



context.evaluateReader(scope, reader, JAVASCRIPT_FILE, 1, null);

} catch (IOException exception) {

throw new CustomException(null, exception);

}

Function functionAdd = (Function) scope.get(JAVASCRIPT_FUNCTION_NAME);



Object returnObject = functionAdd.call(context, scope, scope, new Object[] {

parameter1, parameter2, parameter3

});

But after integrating Progaurd, I'm getting below error:



02-26 14:58:13.200: E/AndroidRuntime(11607): Caused by: java.lang.IllegalStateException: Failed to create VMBridge instance

02-26 14:58:13.200: E/AndroidRuntime(11607): at org.a.b.ds.<clinit>(Unknown Source)

02-26 14:58:13.200: E/AndroidRuntime(11607): ... 11 more

Thank You
Reply all
Reply to author
Forward
0 new messages