0

I want to generate dynamic form in android from JSON data (ie) defined in particular format.. I referred this example

https://github.com/vijayrawatsan/android-json-form-wizard

Please ..Have a look at that example. I followed exactly the same steps as in the link , added repositories and dependency files in my android project.

As i build my gradle file , it synced successfully. But, While running the app it throws error..

2018-11-13 17:23:46.250 10379-10379/com.kt.rvs E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.kt.rvs, PID: 10379
java.lang.NoClassDefFoundError: com.vijay.jsonwizard.activities.JsonFormActivity
    at com.kt.rvs.MainActivity$onCreate$1.onClick(MainActivity.kt:22)

This is the error and the issue i face

java.lang.NoClassDefFoundError: com.vijay.jsonwizard.activities.JsonFormActivity

Please ..Help me solve this issue...

s.vijay
  • 31
  • 8
  • You're going to need to supply the code. The class definition that it is attempting to invoke as well as the json conversion code you are using to make the json create a class. Lastly, I hope I'm reading this wrong, as a JSON parser should not be creating an Activity class. It should be creating data models that are used by Activities, but I'm assuming I'm reading your post wrong due to lack of details – Sam Nov 13 '18 at 14:03
  • if you looked at the github that i mentioned above and then if you look at my issue ..you would have understood i think. In that example they provided the sample JSON data and also the code to implement it to the form that i need... – s.vijay Nov 14 '18 at 04:19
  • Eventhough i followed their steps i get this error java.lang.NoClassDefFoundError: com.vijay.jsonwizard.activities.JsonFormActivity – s.vijay Nov 14 '18 at 04:20
  • Please ...Have a look at it and help me solve this issue @Sam – s.vijay Nov 14 '18 at 04:21
  • Ohhh i see what you are trying to do. Ok, thought that was your json parsing library, but it is a library you are trying to open source create. Got it. I'll take a look – Sam Nov 14 '18 at 21:10
  • 1
    Sorry @s.vijay I took a quick look, but I don't see any immediate glaring issues. I would have to download the code and spend time on it that I don't have to offer. Usually this error happens when proguard removes it, (but it looks like your minifyEnabled is false, or if you don't have it in the manifest activity, but your sample project has it in there. So I'm not sure off a quick glance. Sorry, you have to confirm your library dependency is being pulled in properly and contains the jsonFormActivity. That's the best I can point you for now. – Sam Nov 14 '18 at 21:20
  • I somehow tried and fixed the issue ...Thank you so much for your response @Sam – s.vijay Nov 15 '18 at 04:22
  • glad it worked out for you. btw when you use the android import tool it makes a copy of the library and does not point to the original location. So keep that in mind, if it matters for your situation. Sometimes you have a module outside the project root which requires a special gradle.settings file pointer to import it by relative path instead of using the import method. But only if you keep the project separate – Sam Nov 15 '18 at 16:14
  • Fine...Thanks for the info tips @Sam – s.vijay Nov 16 '18 at 04:18

1 Answers1

0

I fixed this issue by importing the android-json-form-wizard library fully in my project by using Import library option in android studio tool, instead of importing through dependency implementation in gradle file.

s.vijay
  • 31
  • 8