I used the GDX setup to create my project structure with its library alredy included but after I try call an Intent from Android Library I noticed it could not find the class even the library path. Look that screnshot:
Then I started a new project by Android Studio itself and pretty worked as well:
As you can see it looks like gradle problem setting. Then I tried to fix it myself but I could not.
I know to add a library we need to code some dependences even if I remove the GDX dependence it will cause same error. But Android must not need to be added, then I dont know how to add and if will work.
GDX dependence is writen here:
project(":core") {
apply plugin: "java"
dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
// If I remove that line it will causes same error
} [...]
I made some comparation between GDX and Android Studio:
GDX made:
project(":android") {
apply plugin: "android"
configurations { natives }
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"
}
}
Android Studio made:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
I'm using 3.0.1 Android Studio version.