Build failed after upgrade to v1.2.0
anniewey opened this issue ยท 20 comments
Android
/node_modules/react-native-facebook-account-kit/android/src/main/java/io/underscope/react/fbak/RNAccountKitModule.java:242: error: cannot find symbol
configurationBuilder.setEnableInitialSmsButton(setEnableInitialSmsButton);
^
symbol: method setEnableInitialSmsButton(boolean)
location: variable configurationBuilder of type AccountKitConfigurationBuilder
Note: /Users/xxx/dev/xxx/node_modules/react-native-facebook-account-kit/android/src/main/java/io/underscope/react/fbak/RNAccountKitModule.java uses or overrides a deprecated API.
Solution (by @kevinkevw):
Add accountKitSdkVersion = '5.0.0'
in root project's build.gradle
.
iOS
info In file included from /Users/xxx/dev/xxx/node_modules/react-native-facebook-account-kit/ios/RNAccountKit.m:5:
RNAccountKitAdvancedUIManager.h:1:9: fatal error: 'AccountKit/AccountKit.h' file not found
#import <AccountKit/AccountKit.h>
^~~~~~~~~~~~~~~~~~~~~~~~~
Solution
react-native unlink
(on ios only) if uses pod
- React Native Account Kit version: 1.2.0
- React Native version: 0.59.8
- Platform(s) (iOS, Android, or both?): both
Hi @anniewey it seems that the app is not using the latest SDK
Can you try:
cd android
./gradlew clean
cd ..
react-native run-android
Hi @jpgarcia, I've tried the above method. Unfortunately, I'm still getting the same error.
Same here. How to fix ?
It seems to be caused by Android Studio cached the Account Kit SDK 4.
I tried to add accountKitSdkVersion = "5.+" inside root project's build.gradle,
then ./gradlew clean
and run again the problem resolved.
Hi guys, can run the following command to check what version of com.facebook.android:account-kit-sdk you have installed? it should be 5.+ which has the expected method?
cd android
./gradlew app:dependencies | grep account
If 5.+ is not installed you can also try running:
cd android
./gradlew cleanBuildCache
iOS and Android build failing with 1.2.0.
1.1.0 seems to work fine.
@jpgarcia I confirm that my project is still using com.facebook.android:account-kit-sdk:4.39.0
instead of 5+. Not sure why but the build still failed after ./gradlew cleanBuildCache
.
However, I can get it to build using @kevinkevw solution.
Thanks everyone for the help!
--
Update:
As for ios, I was getting below error after pod install
to 1.2.0
. After cleaning the build folder locally, I was able to build successfully. But the error occurred quite frequently whenever I work on different branch, hence I need clean build each time. @cassianomon Are you seeing the same error?
info In file included from /Users/xxx/dev/xxx/node_modules/react-native-facebook-account-kit/ios/RNAccountKit.m:5:
RNAccountKitAdvancedUIManager.h:1:9: fatal error: 'AccountKit/AccountKit.h' file not found
#import <AccountKit/AccountKit.h>
^~~~~~~~~~~~~~~~~~~~~~~~~
Hi @anniewey happy to hear that it is working on Android. Regarding IOS I can suggest you a couple of steps you can do to troubleshoot it.
cd ios
rm Podfile.lock
pod install --repo-update
If you are still facing the issue, you can add to your Podfile
de AccountKit dependency as follows:
target 'XXX' do
pod 'AccountKit', '~> 5.0.1'
end
and run the steps above again.
Hope it helps!
Hi guys, I've already tried everything, but it does not work, I'm using cocoa pods and this is my pod file, does anyone has the solution, just 4 days since launch the new version of this library and everything crash, @cassianomon have you do any hack or something to use 1.1.0, in my case automatically is taking the 1.2.0 version when I did pod install
, any help @jpgarcia @anniewey !!
PodFile:
platform :ios, '9.0'
target 'xxx' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
# Your 'node_modules' directory is probably in the root of your project,
# but if not, adjust the `:path` accordingly
pod 'React', :path => '../node_modules/react-native', :subspecs => [
'Core',
'CxxBridge', # Include this for RN >= 0.47
'DevSupport', # Include this to enable In-App Devmenu if RN >= 0.43
'RCTText',
'RCTNetwork',
'RCTWebSocket', # Needed for debugging
'RCTAnimation', # Needed for FlatList and animations running on native UI thread
# Add any other subspecs you want to use in your project
]
# Explicitly include Yoga if you are using RN >= 0.42.0
pod 'yoga', :path => '../node_modules/react-native/ReactCommon/yoga'
# Third party deps podspec link
pod 'DoubleConversion', :podspec => '../node_modules/react-native/third-party-podspecs/DoubleConversion.podspec'
pod 'glog', :podspec => '../node_modules/react-native/third-party-podspecs/glog.podspec'
pod 'Folly', :podspec => '../node_modules/react-native/third-party-podspecs/Folly.podspec'
pod 'RNGestureHandler', :path => '../node_modules/react-native-gesture-handler'
pod 'react-native-netinfo', :path => '../node_modules/@react-native-community/netinfo'
pod 'RNCAsyncStorage', :path => '../node_modules/@react-native-community/async-storage'
pod 'RNAccountKit', :path => '../node_modules/react-native-facebook-account-kit/ios'
# Pods for goingtube
pod 'Firebase/Auth', '~> 5.20.1'
pod 'Firebase/Core', '~> 5.20.1'
pod 'Firebase/Database', '~> 5.20.1'
pod 'Firebase/DynamicLinks', '~> 5.20.1'
pod 'Firebase/Firestore', '~> 5.20.1'
pod 'Firebase/Messaging', '~> 5.20.1'
pod 'GoogleSignIn', '~> 4.4.0'
pod 'AccountKit', '~> 5.0.1'
target 'xxxxx-tvOSTests' do
inherit! :search_paths
# Pods for testing
end
target 'xxxxxTests' do
inherit! :search_paths
# Pods for testing
end
end
React Native info:
System:
OS: macOS 10.14.4
CPU: (4) x64 Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz
Memory: 173.27 MB / 16.00 GB
Shell: 3.2.57 - /bin/bash
Binaries:
Node: 8.15.0 - ~/.nvm/versions/node/v8.15.0/bin/node
Yarn: 1.13.0 - ~/.nvm/versions/node/v8.15.0/bin/yarn
npm: 6.4.1 - ~/.nvm/versions/node/v8.15.0/bin/npm
Watchman: 4.9.0 - /usr/local/bin/watchman
SDKs:
iOS SDK:
Platforms: iOS 12.2, macOS 10.14, tvOS 12.2, watchOS 5.2
Android SDK:
API Levels: 22, 24, 25, 26, 27, 28
Build Tools: 25.0.0, 27.0.3, 28.0.2, 28.0.3
System Images: android-22 | Google APIs Intel x86 Atom, android-27 | Google APIs Intel x86 Atom, android-28 | Google APIs Intel x86 Atom
IDEs:
Android Studio: 3.2 AI-181.5540.7.32.5056338
Xcode: 10.2.1/10E1001 - /usr/bin/xcodebuild
npmPackages:
react: 16.8.3 => 16.8.3
react-native: ^0.59.6 => 0.59.6
npmGlobalPackages:
react-native-cli: 2.0.1
error:
In file included from RNAccountKitViewController.h:1:
RNAccountKitAdvancedUIManager.h:1:9: fatal error: 'AccountKit/AccountKit.h' file not found
#import <AccountKit/AccountKit.h>
^~~~~~~~~~~~~~~~~~~~~~~~~
error Failed to build iOS project. We ran "xcodebuild" command but it exited with error code 65. To debug build logs further, consider building your app with Xcode.app, by opening xxxx.xcworkspace
Hi @cristianPerez I'm wondering that maybe you've added the AccountKit
framework manually in the past. You can easily check this by opening your project with Xcode.
If this is the case you should delete those, perform a build clean and try again.
To clean your project, close xcode and run the following commands:
rm -rf {YOUR_PROJECT}/ios/build
rm -rfd ~/Library/Developer/Xcode/DerivedData/*
Let me know if this helped!
I'm closing this issue since it is not a library issue but rather a local environment issue.
BTW we just released a new 2.0.0 version of the lib that supports React Native 0.60.0. Before upgrading please take a look to the breaking changes in the release notes.
@jpgarcia thanks for your answer man, I am using the old version, for now, but I will upgrade RN and account kit library next update of my app. thanks and congrats for this project really save my life.
Regards from Colombia !!!
Hi guys. I've upgraded this. and follow that insruction as well.
It seems to be caused by Android Studio cached the Account Kit SDK 4.
I tried to add accountKitSdkVersion = "5.+" inside root project's build.gradle,
then ./gradlew clean
and run again the problem resolved.
@MahbbRah Instead of using 5.+
, fix it on 5.0.0
. I had the same issue this morning
@MahbbRah Instead of using
5.+
, fix it on5.0.0
. I had the same issue this morning
Thank you let me try. I had removed these line from node modules for quick fix, LOL
`
boolean setEnableInitialSmsButton = this.options.getBoolean("setEnableInitialSmsButton");
configurationBuilder.setEnableInitialSmsButton(setEnableInitialSmsButton);
`
I think the latest 5.2.0
version causing the problem, was using 5.0.0
previously.
I have solved it
app/build.gradle
implementation 'com.facebook.android:account-kit-sdk:5.0.0'
andoir/build.gradle
accountKitSdkVersion = "5.0.0"
I have solved it
app/build.gradle implementation 'com.facebook.android:account-kit-sdk:5.0.0' andoir/build.gradle accountKitSdkVersion = "5.0.0"
i see that accountKitSdkVersion (assignement is not used) is disabled in my gradle , please can you help me ?
My solution
app/build.gradle
implementation 'com.facebook.android:account-kit-sdk:5.0.0'
andoir/build.gradle
accountKitSdkVersion = "5.0.0"
build.gradle
accountKitSdkVersion = "5.0.0"