Qt - android.support.v4.app package does not exist

I am using Qt 5.4. I imported the SDK & NDK.

enter image description here

Actually, I tried to use multi-line notification, and I used this line in a Java file:

customMainActivity.java:

   import android.support.v4.app.NotificationCompat;
   NotificationCompat.Builder builder = new NotificationCompat.Builder(
                        context);

I get an error: the package android.support.v4.app does not exist
I read it and it and added android-support-v4.jar and Android-support-v7-appcompat.jar, but I don’t know how to fix it in Qt.

+6
source share
2 answers

build.gradle ( Android " "). - :

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile "com.android.support:support-v4:23.0.+"
}
0
  1. Google Maven build.gradle https://developer.android.com/studio/build/dependencies#google-maven

    allprojects {
        repositories {
            jcenter()
            maven {
                url 'https://maven.google.com'
            }
        }
    }
    
  2. support-v4 build.gradle

    dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar']) 
        compile "com.android.support:support-v4:24.+" 
    }
    
0

All Articles