Giter Club home page Giter Club logo

Comments (4)

LikeTheSalad avatar LikeTheSalad commented on May 30, 2024

Hi @KarimFikani, thanks for your feedback.

I haven’t been able to reproduce the same issue you're getting, and I see that you are properly using the API, so that's not the problem. So my only guess is that there's something about the setup of the library itself that might be missing and I'm going to need the following details to confirm:

  • Have you added Android Buddy into your project? You'd need to set your project as an Android Buddy consumer to make Aaper work.
  • Have you initialized Aaper by calling Aaper.init() into your Application.onCreate method?

If both things are set up, I'd need to take a look at both your root and app's build.gradle files just to see if there might be some misconfiguration on them.

Thanks,
Cesar.

from aaper.

KarimFikani avatar KarimFikani commented on May 30, 2024

@LikeTheSalad I don't have Android Buddy setup and I do call Aaper.init() from Application.onCreate.

Root gradle:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    ext.kotlin_version = "1.4.0"
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

App gradle:

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'

android {
    compileSdkVersion 28
    buildToolsVersion "28.0.3"

    defaultConfig {
        applicationId "com.karim.fikani.snapcam"
        minSdkVersion 24
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

repositories {
    maven { url 'https://jitpack.io' }

    mavenCentral()
    jcenter()
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.3.1'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.0'

    implementation 'com.github.MasayukiSuda:GPUVideo-android:v0.1.1'
    implementation 'com.arthenica:mobile-ffmpeg-full:4.4'
    implementation 'pub.devrel:easypermissions:3.0.0'
    implementation 'com.jackandphantom.android:instagramvideobutton:1.0.0'
    implementation 'com.github.pwittchen:swipe-rx2:0.3.0'
}

Let me know if I'm missing anything

from aaper.

LikeTheSalad avatar LikeTheSalad commented on May 30, 2024

Cool, you're almost done then @KarimFikani, you just need to add the Android Buddy plugin like so:

Your Root Gradle should look like this (with the classpath "com.likethesalad.android:android-buddy-plugin:0.8.4" line in the buildscript dependencies, as shown below)

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    ext.kotlin_version = "1.4.0"
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.1'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath "com.likethesalad.android:android-buddy-plugin:0.8.4"

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

And then your App Gradle should look like this (with the apply plugin: 'android-buddy' line, as shown below)

apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'android-buddy'

android {
    compileSdkVersion 28
    buildToolsVersion "28.0.3"

    defaultConfig {
        applicationId "com.karim.fikani.snapcam"
        minSdkVersion 24
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"

        testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }
}

repositories {
    maven { url 'https://jitpack.io' }

    mavenCentral()
    jcenter()
}

dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
    implementation 'androidx.core:core-ktx:1.3.1'
    implementation 'androidx.appcompat:appcompat:1.2.0'
    implementation 'androidx.constraintlayout:constraintlayout:2.0.0'

    implementation 'com.github.MasayukiSuda:GPUVideo-android:v0.1.1'
    implementation 'com.arthenica:mobile-ffmpeg-full:4.4'
    implementation 'pub.devrel:easypermissions:3.0.0'
    implementation 'com.jackandphantom.android:instagramvideobutton:1.0.0'
    implementation 'com.github.pwittchen:swipe-rx2:0.3.0'
    implementation 'com.likethesalad.android:aaper:1.0.1'
}

And that's it. The Android Buddy plugin takes care of processing Aaper's annotations, that's why it needs to be added into your project. However, it won't be part of your APK file, as it's only used during compilation. πŸ‘

Please let me know if you've got any other questions.

Regards,
Cesar.

from aaper.

LikeTheSalad avatar LikeTheSalad commented on May 30, 2024

Closing due to inactivity.

from aaper.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.