java - LibGDX ClassNotFound on Android -
i'm using libgdx game shares code project. put code in .jar library have added in root build.gradle.
everything works fine on desktop, when launch game on android crashes classnotfound exception. can't find class of library.
can me out? have no idea causing problem.
edit: changes build.gradle:
project(":core") { apply plugin: "java" dependencies { compile "com.badlogicgames.gdx:gdx:$gdxversion" compile "com.badlogicgames.gdx:gdx-freetype:$gdxversion" compile filetree(dir: '../libs', include: '*.jar') } }
you need add same filetree
dependency directly in android
module because android gradle plugin can't handle transitive flat file dependencies.
project(":core") { ... compile filetree(dir: '../libs', include: '*.jar') ... } // , project(":android") { ... compile filetree(dir: '../libs', include: '*.jar') ... }
Comments
Post a Comment