java.lang.NoClassDefFoundError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I tried to build a Cordova+XWalk project using IntelliJ 12.1.7 on MAC OS X 10.9.2 using Android Platform 4.4.2 and java 1.6.0.65. After I created modules for both Cordova and Xwalk and added dependencies to main project from these modules (android library projects) it does compile fine but when running I get this error: {code} 06-05 15:34:42.476: ERROR/AndroidRuntime(837): FATAL EXCEPTION: main java.lang.NoClassDefFoundError: org.chromium.content.R$string at org.chromium.content.browser.ContentViewCore.initialize(ContentViewCore.java:711) at org.chromium.content.browser.ContentView.<init>(ContentView.java:107) at org.chromium.content.browser.JellyBeanContentView.<init>(JellyBeanContentView.java:20) at org.chromium.content.browser.ContentView.newInstance(ContentView.java:89) at org.chromium.content.browser.ContentView.newInstance(ContentView.java:53) at org.xwalk.core.XWalkContent.<init>(XWalkContent.java:93) at org.xwalk.core.XWalkView.initXWalkContent(XWalkView.java:83) at org.xwalk.core.XWalkView.init(XWalkView.java:79) at org.xwalk.core.XWalkView.<init>(XWalkView.java:41) at org.apache.cordova.CordovaWebView.<init>(CordovaWebView.java:144) at no.ic.crosswalk.test.TestApp$1.<init>(TestApp.java:37) at no.ic.crosswalk.test.TestApp.onCreate(TestApp.java:37) {code} I was able to get rid of the error by removing the mentioned class and changing imports where it was used to point to the R file from org.xwalk.core.R that is generated at compile time from XML res files and those xml files have everything what was inside original org.chromium.content.R Maybe I'm missing something because I'm new to crosswalk. I also see the class XWalkInternalResources with method doResetIds that looks like it's doing some processing with the same file.
    via by Ionut Movila,
  • I tried to build a Cordova+XWalk project using IntelliJ 12.1.7 on MAC OS X 10.9.2 using Android Platform 4.4.2 and java 1.6.0.65. After I created modules for both Cordova and Xwalk and added dependencies to main project from these modules (android library projects) it does compile fine but when running I get this error: {code} 06-05 15:34:42.476: ERROR/AndroidRuntime(837): FATAL EXCEPTION: main java.lang.NoClassDefFoundError: org.chromium.content.R$string at org.chromium.content.browser.ContentViewCore.initialize(ContentViewCore.java:711) at org.chromium.content.browser.ContentView.<init>(ContentView.java:107) at org.chromium.content.browser.JellyBeanContentView.<init>(JellyBeanContentView.java:20) at org.chromium.content.browser.ContentView.newInstance(ContentView.java:89) at org.chromium.content.browser.ContentView.newInstance(ContentView.java:53) at org.xwalk.core.XWalkContent.<init>(XWalkContent.java:93) at org.xwalk.core.XWalkView.initXWalkContent(XWalkView.java:83) at org.xwalk.core.XWalkView.init(XWalkView.java:79) at org.xwalk.core.XWalkView.<init>(XWalkView.java:41) at org.apache.cordova.CordovaWebView.<init>(CordovaWebView.java:144) at no.ic.crosswalk.test.TestApp$1.<init>(TestApp.java:37) at no.ic.crosswalk.test.TestApp.onCreate(TestApp.java:37) {code} I was able to get rid of the error by removing the mentioned class and changing imports where it was used to point to the R file from org.xwalk.core.R that is generated at compile time from XML res files and those xml files have everything what was inside original org.chromium.content.R Maybe I'm missing something because I'm new to crosswalk. I also see the class XWalkInternalResources with method doResetIds that looks like it's doing some processing with the same file.
    via by Ionut Movila,
    • java.lang.NoClassDefFoundError: org.chromium.content.R$string at org.chromium.content.browser.ContentViewCore.initialize(ContentViewCore.java:711) at org.chromium.content.browser.ContentView.<init>(ContentView.java:107) at org.chromium.content.browser.JellyBeanContentView.<init>(JellyBeanContentView.java:20) at org.chromium.content.browser.ContentView.newInstance(ContentView.java:89) at org.chromium.content.browser.ContentView.newInstance(ContentView.java:53) at org.xwalk.core.XWalkContent.<init>(XWalkContent.java:93) at org.xwalk.core.XWalkView.initXWalkContent(XWalkView.java:83) at org.xwalk.core.XWalkView.init(XWalkView.java:79) at org.xwalk.core.XWalkView.<init>(XWalkView.java:41) at org.apache.cordova.CordovaWebView.<init>(CordovaWebView.java:144) at no.ic.crosswalk.test.TestApp$1.<init>(TestApp.java:37) at no.ic.crosswalk.test.TestApp.onCreate(TestApp.java:37)
    No Bugmate found.