Giter VIP home page Giter VIP logo

Comments (7)

domax avatar domax commented on September 24, 2024 3

Or, you may do the same in your project's build.gradle script: just replace JavaVersion.VERSION_1_6 to JavaVersion.VERSION_1_7, like that:

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

from cordova-plugin-photos.

domax avatar domax commented on September 24, 2024

Android plugin is written on Java 7, but looks like you're trying to compile it with Java 6.
Just switch your project to Java 7 or 8:

  1. Make sure you have installed JDK 7 or 8 (recommended).
  2. In your project properties specify source and target compatibility 1.7 or 1.8 (if you use Android Studio, you may find it here: File -> Project Structure -> Modules -> android)

from cordova-plugin-photos.

niconaso avatar niconaso commented on September 24, 2024

Thanks!!
I just added this properties

ext.postBuildExtras = {
android {
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
}

into build-extras.gradle and put it on platforms/android

from cordova-plugin-photos.

dnmd avatar dnmd commented on September 24, 2024

Before opening a new issue, I noticed this one, marked as closed. I tried both solutions, via Android studio
File -> Project Structure -> Modules -> android

and by adding an build-extras.gradle extra file within the

platforms -> android -> build-extras.gradle

ext.postBuildExtras = {
    android {
        compileOptions {
            sourceCompatibility JavaVersion.VERSION_1_7
            targetCompatibility JavaVersion.VERSION_1_7
        }
    }
}

But in both scenarios an error is throw: https://i.stack.imgur.com/qBykN.jpg Any thoughts @niconaso @domax ?

from cordova-plugin-photos.

dnmd avatar dnmd commented on September 24, 2024

Okay, it seems that this plugin depends on:

cordova-plugin-compat

and somehow didn't get installed after adding this plugin. Adding it fixed the problem.

cordiva (or ionic) plugin add cordova-plugin-compat --save

I'll see if I can PR a short note for the readme, I think it will help some people out! :)

from cordova-plugin-photos.

domax avatar domax commented on September 24, 2024

@dnmd : I've just added explicit dependency to cordova-plugin-compat

from cordova-plugin-photos.

eddskt avatar eddskt commented on September 24, 2024

Or, you may do the same in your project's build.gradle script: just replace JavaVersion.VERSION_1_6 to JavaVersion.VERSION_1_7, like that:

    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }

Thanksssss Solved for me!

from cordova-plugin-photos.

Related Issues (20)

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.