Can't run sample project
Closed this issue · 4 comments
Sorry to post such a simple problem, but I am unable to run the sample project. I was able to build after adding the dynamicgrid project in the build path of the example project. However, when I run the example project on the device, it crashes with this error:
10-22 23:05:07.275: E/dalvikvm(7303): Could not find class 'org.askerov.dynamicgrid.DynamicGridView', referenced from method org.askerov.dynamicgrid.example.GridActivity.onCreate
I searched for an answer, and found some comments regarding use of "/lib" versus "/libs". However, I am a total novice at Java and I really don't understand how to properly include one project in another project.
I thank you in advance for your time to consider this problem
Are you running a gradle project? If so then just copy the whole project structure into you project root and add
include ':DynamicGrid:dynamicgrid'
into your settings.gradle
Then add it to your gradle dependencies:
dependencies {
compile project (':DynamicGrid:dynamicgrid')
}
You can check this project for the reference
https://github.com/denisk20/bullshit-bingo-champion
I am running eclipse
I did some research and found out it is possible to mix gradle and eclipse, just not easy.
I created an android application project type = library in my eclipse project using your code. I am able to build and run successfully in my eclipse project.
This item can be closed?
Problem was mine, not the project
Same problem here. I imported both projects in Eclipse (GridActivity and dynamicgrid), mentioned dynamicgrid in the build path of GridActivity. No error at compile. But crash on setContentView(R.layout.activity_grid); (of the onCreate method) at launchtime.
Can you detail how you fix the problem ? Thanks !