Reputation: 715
Currently I am working on developing a React Native app where I installed two components:
1) React Native Elements UI Toolkit 2) mastermoo/react-native-action-button for FAB button
Before installing the above components, the app was compiling and running fine on my device but post installation of the above components I was getting couple of errors where I didn't have Android API level up to 26 (Android 8.0) installed and installed all of it overnight.
Post installation of the required APIs, I am getting the following error now which I am unable to solve:
A problem occurred configuring project ':app'.
Could not resolve all dependencies for configuration ':app:_debugApk'. A problem occurred configuring project ':react-native-vector-icons'. You have not accepted the license agreements of the following SDK components: [Android SDK Build-Tools 26.0.1].
Tech Specifications:
1) Operating System: Windows 10 (Really fed-up of Windows, soon buying MacBook Pro)
2) Installed Android APIs - 4.2.2 - 8.0 (API 26)
Would be great if you all could help me solve this issue.
Thank you and best regards. -Rohit
Upvotes: 3
Views: 2471
Reputation: 715
Finally after a lot of head banging and hair pulling since last 2 days, I've solved this painful issue which one may face while working on Windows environment. The require steps are:
A) Set proper Environment Variables
1) Under User Variables make sure you have ANDROID_HOME and adb variable Path are set like:
ANDROID_HOME C:\Android\sdk
adb C:\Android\sdk\platform-tools
2) Under System Variables, make sure you have set these Path variables(my sdk is installed at C:\Android, use yours path as per what and where you have on your system):
C:\Android\sdk\platform-tools
C:\Android\sdk\tools
C:\Android\sdk\tools\bin
B) Close all open Folders/File Explorers and exit all Command Prompt Terminals
C) Open a command prompt terminal as Administrator and issue the below commands (make sure adb and sdkmanager command are accessible from anywhere without changing directory to the SDK directories):
sdkmanager "build-tools;26.0.1"
I was having build tool license issue so the above command. Nevertheless, Accept the license by typing Y, wait for it to print "done"
cd android && gradlew clean
THEN
cd .. && react-native run-android
Upvotes: 2