flutter_apple_sign_in
flutter_apple_sign_in copied to clipboard
Unable to build on Android after including Apple Sign In
Using Flutter version 1.12.13+hotfix.5, I get this when trying to build the app on android:
A problem occurred configuring root project 'apple_sign_in'. > SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable.
- What went wrong: A problem occurred configuring root project 'apple_sign_in'.
SDK location not found. Define location with sdk.dir in the local.properties file or with an ANDROID_HOME environment variable. Any help regarding this???
The only solution i've found is to comment out the plugin and any references to it when building on android and then reinstate these when building on iOS. Not an ideal solution, but it works.
I had the same error but it turned out to be a problem from an earlier step in the build - I had a wrong splash image filename in styles.xml.
Same thing here. It used to work fine. Any breaking change recently introduced?
I can't reproduce this. I created a new Flutter project, added the plugin, and it builds fine in release and debug. Need more info, logs or ideally an example project.
I have the same issue when trying to build an APK, Appbunle builds fine. flutter doctor output:
[√] Flutter (Channel stable, v1.12.13+hotfix.9, on Microsoft Windows [Version 10.0.18363.778], locale en-ZA) • Flutter version 1.12.13+hotfix.9 at D:\Android\flutter • Framework revision f139b11009 (5 weeks ago), 2020-03-30 13:57:30 -0700 • Engine revision af51afceb8 • Dart version 2.7.2
[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3) • Android SDK at D:\Android\sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.3 • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04) • All Android licenses accepted.
[√] Android Studio (version 3.6) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin version 45.1.1 • Dart plugin version 192.7761 • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)
[√] VS Code (version 1.43.2) • VS Code at C:\Users\kikst\AppData\Local\Programs\Microsoft VS Code • Flutter extension version 3.9.1
[√] Connected device (1 available) • ONEPLUS A6003 • 7f30ffc • android-arm64 • Android 10 (API 29)
• No issues found!
try flutter clean
For me this happened when I adding the following to the android manifest.
<meta-data android:name="com.google.firebase.messaging.default_notification_channel_id" android:value="@string/default_notification_channel_id" />
I needed to add the following to the strings.xml file to resolve it.
<string name="default_notification_channel_id" translatable="false">fcm_default_channel</string>
Try upgrading Gradle, that fixed it for me.
still the problem is not solved
not solved, still
I am having the same issue with this plug-in
Same Issue. Using: Flutter Channel master, 1.23.0-19.0.pre.95 compileSdkVersion 29, distributionUrl=https://services.gradle.org/distributions/gradle-6.5-all.zip and 'com.android.tools.build:gradle:4.1.0'
Still not resolved.
I migrated to package:sign_in_with_apple, it's actively maintained and doesn't cause bizarre issues like this one.
Hello, I migrated to https://pub.dev/packages/firebase_auth_oauth, it solved my issues with apple sign in as well as letting Android being able to sign in with apple ID. I followed https://fireship.io/lessons/apple-signin-with-firebase-tutorial/ to set up the separate services ID required to get it to work. I also set up firebase hosting to get it to work as well.
I resolved this problem by update compileSdkVersion to 29, and targetSdkVersion to 30.😁
I still have this problem. Did anyone solve this issue?
If you are using Firebase I found the easiest package to use for Apple Sign in is: firebase_auth_oauth: ^0.2.2 ...This package allows for Apple ID to be used on Android systems as well.
Tips:
Don't forget to set up a separate Service ID within your developer account Certificates, Identifiers & Profiles if using this package and include
implementation 'androidx.browser:browser:1.2.0'
in your app build gradle, for Android and in your main -> AndroidManifest.xml
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
For my case , similar to @robisaks , I had a wrong color code which is <color name="ta">#f2fcec1</color>, in the colors.xml and It triggered this error. But I wonder why it connects to Apple sign in ?
Below is my full colors.xml file with the wrong color code.
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="black">#000000</color>
<color name="ta">#f2fcec1</color>
</resources>
I upgraded android/build.gradle to
classpath 'com.android.tools.build:gradle:3.3.0'
from
classpath 'com.android.tools.build:gradle:3.2.1'
and it resolved the issue for me
I still have this problem. Did anyone solve this issue?