Please i need help on how to turn my website into an app

Please is it possible for me to build an with a website. Where i just have to call a website in the flutter app and it turns to an app, if YES please how can i do it cos i have already developed the app…
and please how can i make my app to load before it will open as an app.

thanks as i await your replies

Hi @edoga I cannot rely understand what is that you are trying to achieve here. Could you explain a little bit more. Maybe add some screenshots of what it is that you are trying to accomplish.

2 Likes

Yes I agree with @F.lucadetena. Please give some more clarity.

Are you referring to running your website ina Webview?

thanks… i have rectified the issue and i used webview…

1 Like

please i am having another after i set up my firebase for my app…


Running Gradle task 'assembleDebug'...


FAILURE: Build failed with an exception.



* What went wrong:

Execution failed for task ':app:packageDebug'.

> Several variant outputs are configured to use the same file name "resources-debug.ap_", filters : MAIN:MAIN



* Try:

Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.



* Get more help at https://help.gradle.org



BUILD FAILED in 1m 48s
Running Gradle task 'assembleDebug'...                            111.0s
Exception: Gradle task assembleDebug failed with exit code 1~~~

Hi @edoga great to know you solved the first problem. In relation to your Firebase problem, it looks like you haven’t setup Firebase well on one of the gradle’s on Android.

Could you explain what steps have you taken to implement Firebase and what services are you using.

Maybe adding your pubspec and the to gradle file two.

I implement firebase all the time, it takes 5 min. Só don’t worry we will solve it. Add the files an we go from there. :wink:

the site i used was ~https://console.firebase.google.com/~
process involved

Project-level build.gradle ( `<project>/build.gradle` ):

*content_copy*

*content_copy*

*content_copy*

buildscript {
repositories {
// Check that you have the following line (if not, add it):
google() // Google's Maven repository
}
dependencies {
...
// Add this line
classpath 'com.google.gms:google-services:4.3.3'
}
}

allprojects {
...
repositories {
// Check that you have the following line (if not, add it):
google() // Google's Maven repository
...
}
}

App-level build.gradle ( `<project>/<app-module>/build.gradle` ):

*content_copy*

*content_copy*

*content_copy*

apply plugin: 'com.android.application'
// Add this line
apply plugin: 'com.google.gms.google-services'

dependencies {
// add the Firebase SDK for Google Analytics
implementation 'com.google.firebase:firebase-analytics:17.2.2'
// add SDKs for any other desired Firebase products
// https://firebase.google.com/docs/android/setup#available-libraries
}~~~
after which i ran the app to verify installation which started giving me the error...

the app build.gradle
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 GradleException("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: ‘kotlin-android’

apply from: “$flutterRoot/packages/flutter_tools/gradle/flutter.gradle”

android {

compileSdkVersion 28

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.e_commerce"

    minSdkVersion 16

    targetSdkVersion 28

    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"

implementation 'com.google.firebase:firebase-analytics:17.2.2'

}

apply plugin: ‘com.google.gms.google-services’~~~

andriod gradle
buildscript {

    ext.kotlin_version = '1.3.50'

    repositories {

        google()

        jcenter()

    }

    dependencies {

        classpath 'com.android.tools.build:gradle:3.5.0'

        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

        classpath 'com.google.gms:google-services:4.3.3'

    }

}

allprojects {

    repositories {

        google()

        jcenter()

    }

}

rootProject.buildDir = '../build'

subprojects {

    project.buildDir = "${rootProject.buildDir}/${project.name}"

}

subprojects {

    project.evaluationDependsOn(':app')

}

task clean(type: Delete) {

    delete rootProject.buildDir

}~~~
thanks as i await your reply...

from the tutorial that i was watching from, he didnt add any pubspec file

Please try flutter clean and rebuild.

Ok so there a a couple of things that are not specified in the instructions I think you followed.

First your “minSdkVersion” in the "android/app/build.gradle must be at least 21.

Then you need to add to your “pubspec.yaml” file “firebase_core: ^0.4.5” and any other package you want to use. You can finde the list here: https://github.com/FirebaseExtended/flutterfire

If that doesn’t work hit me up and we can do a call to see where you went wrong :wink:

1 Like