Flutter Login With Facebook



我在使用facebook登录时生成apk有问题

im使用flutter_facebook_login: ^3.0.0

当我试图生成apk时,我仍然得到这个:

我已经完成了所有的配置来使用facebook登录,我尝试了一下,没有问题,但当尝试生成apk时,问题来了!

Note: /Users/abuzreaq/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_facebook_login-3.0.0/android/src/main/java/com/roughike/facebooklogin/facebooklogin/FacebookLoginPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.                    
  
FAILURE: Build failed with an exception.                                
  
* What went wrong:                                                      
Execution failed for task ':keyboard_visibility:verifyReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
> 1 exception was raised by workers:                                 
com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource linking failed
/Users/abuzreaq/.gradle/caches/transforms-2/files-2.1/e12f293e8f097aaa63c82a5c3a8ea889/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/fontVariationSettings not found.
  
/Users/abuzreaq/.gradle/caches/transforms-2/files-2.1/e12f293e8f097aaa63c82a5c3a8ea889/core-1.1.0/res/values/values.xml:142:5-173:25: AAPT: error: resource android:attr/ttcIndex not found.
  
  
  
* 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 10m 25s                                                 
Running Gradle task 'assembleRelease'...                                
Running Gradle task 'assembleRelease'... Done                     629.5s
The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetifier to solve the incompatibility.
Building plugin flutter_facebook_login...
Running Gradle task 'assembleAarRelease'...                             
Running Gradle task 'assembleAarRelease'... Done                   25.3s

FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring root project 'facebook_login'.
> SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
* 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 24s

有人能帮我吗?

它说在你的项目上找不到Android SDK。

当你更新android studio或gradle时,有时会发生这种情况。

您可以在Android文件夹中的local.properties上设置路径

flutter.buildMode=release
flutter.versionName=2.0.0
flutter.sdk=C:\src\flutter
sdk.dir=C:\Users\David\AppData\Local\Android\sdk
flutter.versionCode=1001

最新更新