Back

Latest Flutter Appwrite failing to compile?

  • 0
  • Tools
  • Flutter
Vedsaga
17 Mar, 2023, 18:53

All changes done now compiling it

TL;DR
The user is having trouble compiling the latest Flutter Appwrite. The solution is to remove the `<data>` tag from the main activity and add it in a separate activity. They also recommend running `flutter clean`, `flutter upgrade`, and `flutter run` to resolve any issues.
Binyamin
17 Mar, 2023, 18:53

🀞

Vedsaga
17 Mar, 2023, 18:53

🀞

Vedsaga
17 Mar, 2023, 18:57

it compiled but, did got this warning when run the with verbose mode

Vedsaga
17 Mar, 2023, 18:58
Vedsaga
17 Mar, 2023, 18:58

didn't work

Binyamin
17 Mar, 2023, 18:58

It's seem like you don't have a launcher activity

Vedsaga
17 Mar, 2023, 18:58

OS is not showing open app Button

Binyamin
17 Mar, 2023, 18:58

Can you share the activity code from the manifest?

Vedsaga
17 Mar, 2023, 18:58

One min

Vedsaga
17 Mar, 2023, 18:59
Vedsaga
17 Mar, 2023, 18:59
TypeScript
        <activity
            android:name=".MainActivity"
            android:exported="true"
            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">
            <!-- Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user
                 while the Flutter UI initializes. After that, this theme continues
                 to determine the Window background behind the Flutter UI. -->
            <meta-data
                android:name="io.flutter.embedding.android.NormalTheme"
                android:resource="@style/NormalTheme"
            />
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
                <data android:scheme="appwrite-callback-640f1522049c96d734d6" />

            </intent-filter>
        </activity>```
Vedsaga
17 Mar, 2023, 19:01

this one...

Binyamin
17 Mar, 2023, 19:01

For this try to run flutter clean flutter upgrade flutter run And then it should gone

Vedsaga
17 Mar, 2023, 19:03

flutter upgrade to latest it happen

Vedsaga
17 Mar, 2023, 19:03

I guess you mean flutter pub get?

Binyamin
17 Mar, 2023, 19:03

flutter pub upgrade

Binyamin
17 Mar, 2023, 19:03

sorry

Vedsaga
17 Mar, 2023, 19:04

flutter run does work app works perfectly fine in debug but after compling it doesn't

Binyamin
17 Mar, 2023, 19:05

Okay I see the problem You can't add the data tag inside the LAUNCHER activity You need to add it in a separate activity as you see here

https://appwrite.io/docs/getting-started-for-flutter#android

That's mean your file should look like this

TypeScript
   <activity
            android:name=".MainActivity"
            android:exported="true"
            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">
            <!-- Specifies an Android theme to apply to this Activity as soon as
                 the Android process has started. This theme is visible to the user
                 while the Flutter UI initializes. After that, this theme continues
                 to determine the Window background behind the Flutter UI. -->
            <meta-data
                android:name="io.flutter.embedding.android.NormalTheme"
                android:resource="@style/NormalTheme"
            />
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />


            </intent-filter>
        </activity>

<activity android:name="com.linusu.flutter_web_auth_2.CallbackActivity" android:exported="true">
      <intent-filter android:label="flutter_web_auth_2">
        <action android:name="android.intent.action.VIEW" />
        <category android:name="android.intent.category.DEFAULT" />
        <category android:name="android.intent.category.BROWSABLE" />
        <data android:scheme="appwrite-callback-640f1522049c96d734d6" />
      </intent-filter>
    </activity>
Binyamin
17 Mar, 2023, 19:05

Remember to remove the <data> tag from the main activity

Vedsaga
17 Mar, 2023, 19:08

let me once try this

Vedsaga
17 Mar, 2023, 19:16

thank you so much this solves it, phew ...

Vedsaga
17 Mar, 2023, 19:16

finally from next morning I can now focus on working Logic part now... Thank you again πŸ™ ...

Binyamin
17 Mar, 2023, 19:17

Sure thing πŸ˜„

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more