Git Product home page Git Product logo

Comments (11)

KALU-KELECHI-GABRIEL avatar KALU-KELECHI-GABRIEL commented on May 27, 2024

I am also interested in this

from facerecognitionauth.

guruhyes avatar guruhyes commented on May 27, 2024

try this :
https://stackoverflow.com/questions/65018588/your-flutter-application-is-created-using-an-older-version-of-the-android-embedd

if platform error try ovverides in pubspec.yaml:
dependency_overrides:
platform: ^3.1.0

and last is change graddle-wapper.properties version to this
gradle-6.6.1-all.zip

its work for me

from facerecognitionauth.

SiddharthOza00 avatar SiddharthOza00 commented on May 27, 2024

Can you share your code please? @guruhyes

from facerecognitionauth.

guruhyes avatar guruhyes commented on May 27, 2024

in manifest
`

<application
    android:name="${applicationName}"
    android:label="FaceNet"
    android:icon="@mipmap/ic_launcher">
    <activity
        android:name=".MainActivity"
        android:launchMode="singleTop"
        android:theme="@style/LaunchTheme"
        android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
        android:hardwareAccelerated="true"
        android:windowSoftInputMode="adjustResize">
        
        <intent-filter>
            <action android:name="android.intent.action.MAIN"/>
            <category android:name="android.intent.category.LAUNCHER"/>
        </intent-filter>
    </activity>
    <!-- Don't delete the meta-data below.
         This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
    <meta-data
        android:name="flutterEmbedding"
        android:value="2" />
     <meta-data
        android:name="com.google.firebase.ml.vision.DEPENDENCIES"
        android:value="ocr" />
    <!-- To use multiple models: android:value="ocr,label,barcode,face" -->
</application>

`

in wrapper properties
image

in pubspec
image

from facerecognitionauth.

SiddharthOza00 avatar SiddharthOza00 commented on May 27, 2024

I did that but its still not working if you have it then can you share the entire code? @guruhyes

from facerecognitionauth.

KALU-KELECHI-GABRIEL avatar KALU-KELECHI-GABRIEL commented on May 27, 2024

what error message are you getting

Nevertheless try the following changes that worked for me

in android/build.gradle change the ext.Kotlin_version to the latest i.e 1.6.10 and the gradle version in the dependencies

buildscript {
    ext.kotlin_version = '1.6.10'
    repositories {
        google()
        jcenter()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:4.1.0'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
        classpath 'com.google.gms:google-services:4.3.3'
    }
}

in pubspec.yaml change camera entry to

 camera:
    git:
      url: https://github.com/flutter/plugins
      path: packages/camera/camera
      ref: 9e46048ad2e1f085c1e8f6c77391fa52025e681f

my android/app/build.gradle looks like

def localProperties = new Properties()
def localPropertiesFile = rootProject.file('local.properties')
if (localPropertiesFile.exists()) {
    localPropertiesFile.withReader('UTF-8') { reader ->
        localProperties.load(reader)
    }
}

def flutterRoot = localProperties.getProperty('flutter.sdk')
if (flutterRoot == null) {
    throw new FileNotFoundException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
}

def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
if (flutterVersionCode == null) {
    flutterVersionCode = '1'
}

def flutterVersionName = localProperties.getProperty('flutter.versionName')
if (flutterVersionName == null) {
    flutterVersionName = '1.0'
}

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'kotlin-android'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"

android {
    aaptOptions {
        noCompress "tflite"
        noCompress "lite"
    }

    compileSdkVersion 31

    sourceSets {
        main.java.srcDirs += 'src/main/kotlin'
    }

    lintOptions {
        disable 'InvalidPackage'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.example.FaceNet"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
        }
    }

}

flutter {
    source '../..'
}

dependencies {
    implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
}

from facerecognitionauth.

guruhyes avatar guruhyes commented on May 27, 2024

I did that but its still not working if you have it then can you share the entire code? @guruhyes

can you show the error log?
or

you can try @KALU-KELECHI-GABRIEL solution

from facerecognitionauth.

SiddharthOza00 avatar SiddharthOza00 commented on May 27, 2024

@KALU-KELECHI-GABRIEL there is still error in app/build.gradle code you shared

from facerecognitionauth.

KALU-KELECHI-GABRIEL avatar KALU-KELECHI-GABRIEL commented on May 27, 2024

@SiddharthOza00 Check out the working project repository https://github.com/KALU-KELECHI-GABRIEL/FaceRecognition.git

from facerecognitionauth.

SiddharthOza00 avatar SiddharthOza00 commented on May 27, 2024

In your project you are using flutter 2.7 not the latest one @KALU-KELECHI-GABRIEL .
Also I am getting these errors
error

from facerecognitionauth.

MCarlomagno avatar MCarlomagno commented on May 27, 2024

Hi Guys, sorry for the late answer, I just updated the project to null safety. I'm going to work on the issues found later, thanks for contribuiting!

from facerecognitionauth.

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.