GithubHelp home page GithubHelp logo

kldavis4 / android-noclassdeffounderror-example Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 244 KB

Simple example project demonstrating NoClassDefFoundError as reported here http://stackoverflow.com/questions/25194024/java-lang-noclassdeffounderror-com-acme-rlayout-referencing-android-library

Groovy 45.55% Java 54.45%

android-noclassdeffounderror-example's Introduction

android-NoClassDefFoundError-example

Simple example project demonstrating NoClassDefFoundError as reported here http://stackoverflow.com/questions/25194024/java-lang-noclassdeffounderror-com-acme-rlayout-referencing-android-library

Build and install testlib aar to local maven repo

cd testlib
../MyApplication/gradlew clean build publishToMavenLocal

Build and install test app to android device

cd ../MyApplication/app
../gradlew clean installDebug

Instructions

To reproduce the error, install the test application then click the Launch Activity button.

The following exception will occur and the app will close:

W/dalvikvm(19289): VFY: unable to resolve static field 6 (test_activity_layout) in Lcom/acme/R$layout;
D/dalvikvm(19289): VFY: replacing opcode 0x60 at 0x0003
D/AndroidRuntime(19289): Shutting down VM
W/dalvikvm(19289): threadid=1: thread exiting with uncaught exception (group=0x41595ba8)
E/AndroidRuntime(19289): FATAL EXCEPTION: main
E/AndroidRuntime(19289): Process: com.acme.myapplication, PID: 19289
E/AndroidRuntime(19289): java.lang.NoClassDefFoundError: com.acme.R$layout
E/AndroidRuntime(19289):        at com.acme.TestActivity.onCreate(TestActivity.java:16)
E/AndroidRuntime(19289):        at android.app.Activity.performCreate(Activity.java:5231)
E/AndroidRuntime(19289):        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)E/AndroidRuntime(19289):        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2148)
E/AndroidRuntime(19289):        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2233)
E/AndroidRuntime(19289):        at android.app.ActivityThread.access$800(ActivityThread.java:135)
E/AndroidRuntime(19289):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1196)
E/AndroidRuntime(19289):        at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime(19289):        at android.os.Looper.loop(Looper.java:136)
E/AndroidRuntime(19289):        at android.app.ActivityThread.main(ActivityThread.java:5001)
E/AndroidRuntime(19289):        at java.lang.reflect.Method.invokeNative(Native Method)E/AndroidRuntime(19289):        at java.lang.reflect.Method.invoke(Method.java:515)
E/AndroidRuntime(19289):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
E/AndroidRuntime(19289):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
E/AndroidRuntime(19289):        at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager(  590):   Force finishing activity com.acme.myapplication/com.acme.TestActivityW/ActivityManager(  590):   Force finishing activity com.acme.myapplication/.MyActivity

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.