Skip to content

Commit

Permalink
Merge pull request #9821 from garymathews/TIMOB-25749
Browse files Browse the repository at this point in the history
[TIMOB-25749] Android: Fix loading of commonjs modules
  • Loading branch information
Lokesh Choudhary committed Feb 17, 2018
2 parents fa3540b + e6c8d74 commit 9a6f501
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion android/templates/build/App.java
Expand Up @@ -8,6 +8,7 @@
import org.appcelerator.kroll.runtime.v8.V8Runtime;

import org.appcelerator.kroll.KrollExternalModule;
import org.appcelerator.kroll.common.KrollSourceCodeProvider;
import org.appcelerator.kroll.KrollModule;
import org.appcelerator.kroll.KrollModuleInfo;
import org.appcelerator.kroll.KrollRuntime;
Expand Down Expand Up @@ -62,7 +63,7 @@ public void onCreate()
try {
runtime.addExternalCommonJsModule(
"<%- module.manifest.moduleid %>",
(Class<KrollExternalModule>) Class.forName(className));
(Class<KrollSourceCodeProvider>) Class.forName(className));
} catch (Throwable ex) {
Log.e(TAG, "Failed to add external CommonJS module: " + className);
if ((ex instanceof RuntimeException) == false) {
Expand Down

0 comments on commit 9a6f501

Please sign in to comment.