You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Install facebook_app_events: ^0.19.3 and configure Android manifest as documented with facebook_app_id and facebook_client_token
Call the ‘logPurchase‘ method
E/MethodChannel#flutter.oddbit.id/facebook_app_events( 2737): kotlin.UninitializedPropertyAccessException: lateinit property appEventsLogger has not been initialized.
Expected Behavior
Expected that the plugin would initialize the Facebook SDK
Steps To Reproduce
1.Install facebook_app_events: ^0.19.3[0.19.4, 0.19.2]
2. configure Android manifest as documented with facebook_app_id and facebook_client_token <application android:label='xxxx'> <meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" /> ... <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/> <meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/> </application >
, andriod/app/src/main/res/values and values-night/styles.xml <resources> ... <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> <!-- Show a splash screen on the activity. Automatically removed when the Flutter engine draws its first frame --> <item name="android:windowBackground">@drawable/launch_background</item> </style> ... <string name="facebook_app_id">xxx</string> // xxx representing the configured FaceBook AppId <string name="facebook_client_token">xxxxxxx</string> // xxxxxxx representing the configured FaceBook Token </resources>
Test in app: FacebookAppEvents().logPurchase(amount: 1.00, currency: 'USD');
Platform
Android
Flutter Doctor
Flutter assets will be downloaded from https://storage.flutter-io.cn. Make sure you trust this source!
[√] Flutter (Channel stable, 3.19.6, on Microsoft Windows [版本 10.0.22631.4460], locale zh-CN)
• Flutter version 3.19.6 on channel stable at C:\Users\wangr\fvm\versions\3.19.6
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 54e66469a9 (7 months ago), 2024-04-17 13:08:03 -0700
• Engine revision c4cd48e186
• Dart version 3.3.4
• DevTools version 2.31.1
• Pub download mirror https://pub.flutter-io.cn
• Flutter download mirror https://storage.flutter-io.cn
[√] Windows Version (Installed version of Windows is version 10 or higher)
[√] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at D:\android SDK
• Platform android-34, build-tools 34.0.0
• ANDROID_HOME = D:\android SDK
• Java binary at: C:\Users\wangr\Downloads\android-studio-2023.2.1.23-windows-exe\android-studio\jbr\bin\java
• Java version OpenJDK Runtime Environment (build 17.0.9+0--11185874)
• All Android licenses accepted.
[√] Android Studio (version 2022.2)
• Android Studio at D:\android
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version openjdk version "17.0.6" 2023-01-17
[√] Android Studio (version 2023.2)
• Android Studio at C:\Users\wangr\Downloads\android-studio-2023.2.1.23-windows-exe\android-studio
• Flutter plugin can be installed from:
https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
https://plugins.jetbrains.com/plugin/6351-dart
• Java version openjdk version "17.0.9" 2023-10-17
[!] Connected device
! No devices available
[√] Network resources
• All expected network resources are available.
! Doctor found issues in 1 category.
The text was updated successfully, but these errors were encountered:
hhzhangzy
changed the title
[Bug]: 0.19.2 Android: kotlin.UninitializedPropertyAccessException: lateinit property appEventsLogger has not been initialized
[Bug]: 0.19.3 Android: kotlin.UninitializedPropertyAccessException: lateinit property appEventsLogger has not been initialized
Nov 20, 2024
Is there an existing issue for this?
Current Behavior
Install facebook_app_events: ^0.19.3 and configure Android manifest as documented with facebook_app_id and facebook_client_token
Call the ‘logPurchase‘ method
E/MethodChannel#flutter.oddbit.id/facebook_app_events( 2737): kotlin.UninitializedPropertyAccessException: lateinit property appEventsLogger has not been initialized.
Expected Behavior
Expected that the plugin would initialize the Facebook SDK
Steps To Reproduce
1.Install facebook_app_events: ^0.19.3[0.19.4, 0.19.2]
2. configure Android manifest as documented with facebook_app_id and facebook_client_token
<application android:label='xxxx'> <meta-data android:name="io.flutter.embedding.android.NormalTheme" android:resource="@style/NormalTheme" /> ... <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/> <meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/> </application >
, andriod/app/src/main/res/values and values-night/styles.xml
<resources> ... <style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar"> <!-- Show a splash screen on the activity. Automatically removed when the Flutter engine draws its first frame --> <item name="android:windowBackground">@drawable/launch_background</item> </style> ... <string name="facebook_app_id">xxx</string> // xxx representing the configured FaceBook AppId <string name="facebook_client_token">xxxxxxx</string> // xxxxxxx representing the configured FaceBook Token </resources>
Test in app:
FacebookAppEvents().logPurchase(amount: 1.00, currency: 'USD');
Platform
Android
Flutter Doctor
The text was updated successfully, but these errors were encountered: