I\'m having the same issue as in this question, but the answers there doesn\'t solve my problem.
I didn\'t create project by gdxsetup.jar, I just included gdx.jar an
My problem was that I was trying to make my GDX app within a shared library (aka, not the thing that gets compiled into an APK), but hadn't finished setting up all the GDX-including stuff in my lib.
So I had:
MyProject
-->MyMainApp
-->-->build.gradle <-- no updates required, doesn't do anything with GDX
-->MySharedLibraryWhereMyGameEngineIs
-->-->build.gradle <-- this is where the problem was
In the shared lib's build.gradle, I hadn't included the sourceSets
parameter.
Adding it fixed my problem. GDX now starts up successfully.
apply plugin: 'com.android.library'
android {
... config stuff ...
sourceSets { // this wasn't here before
main { // this wasn't here before
jniLibs.srcDirs = ['libs'] // this wasn't here before
} // this wasn't here before
instrumentTest.setRoot('tests')// this wasn't here before
}
... a bunch of other config stuff ...
}