My IBM MobileFirst v 7.0 project is not able to build an Android application. I'm getting the message below.
[2015-04-22 17:32:15] FWLST1125W: Android build will fail because an Android SDK was not installed. Use the Android SDK Manager to install API level 21, configure
your project to build with API level 21 by updating the Project Build Target in Project / Properties / Android dialog.
[2015-04-22 17:32:22] Failed Running Android Studio: Specify location of Android Studio in Window->Preferences->MobileFirst
And I have given the right path of Android Studio.
In MobileFirst Platform you have two development paths for Android applications:
Use Google's ADT tools; this will enable MobileFirst Studio to generate an Android project for the Hybrid application
If you do not have the ADT Eclipse plug-in installed you will receive this warning:
FWLST1125W: Android build will fail because an Android SDK was not
installed. Use the Android SDK Manager to install API level 21,
configure your project to build with API level 21 by updating the
Project Build Target in Project / Properties / Android dialog.
Use Android Studio; even if you have Android Studio set-up, you will still get the above warning in MobileFirst Studio - we're aware of this and have a ticket open about it. In this case, you can disregard the warning.
To use Android Studio from MobileFirst Studio, go to Eclipse > Preferences... > MobileFirst and set the path to the folder that contains Android Studio. For example, in Mac that would be /Applications.
Related
I have started learning android and i'm stuck at something.
I have installed android sdk api 22 and when i'm syncing it with gradle , the following error is popping up:
Failed to find target with hash string 'android-27' in: C:\Users\user
\AppData\Local\Android\android-sdk
it says that it is missing android sdk api 27 but i have installed android sdk api 22
why is it not selecting the installed sdk
1.>Uninstall your android studio. remove all folders. and sdk from c drive.just remove all file folder related to android studio.
2.>Download latest android studio from android developer site using below link.
https://developer.android.com/studio/?gclid=CjwKCAiAyrXiBRAjEiwATI95mQYBGcmv_eUPnDUijy-THzdWA_dIIc-6iM1CEZ0w-k02TxfN4wqbXBoCTAYQAvD_BwE
3.Install android studio from downloaded .exe file.
will work fine if android studio will install successfully.
android studio don't need sdk externally.
Check the app/build.gradle file, maybe you specified sdk version 27 on it, you can change it with api 22.
Android Studio 3.2.1
C:\Android\sdk\platforms
I have already installed the components and the android-28 and android-27 API but in Android Studio it still not showing up as installed and because of it, I have problems with Building the project using Gradle.
Latest Android SDK is not letting me use android command, as it is deprecated to create a mfp cordova project.
I'm using IBM MobileFirst CLI v7.1.0.00.20180706-0858 and latest Android SDK & Android Studio.
May I know any work around to create a project with mfp cordova?
Updated
Steps to reproduce the issue:
1) Download and install the latest Android Studio and download the latest Android SDK using sdkmanager. Set the system variables to the downloaded SDK buildtools and tools.
2) Download and install the latest MFP CLI v7.1.0.00.20180706-0858.
3) Run mfp cordova create in the command line and the following error happens.
MFP cordova project create Error Screenshot
Android Deprecated Screenshot
Thank you
MobileFirst CLI contains an instance of Cordova CLI v5.0.0, Android platform version 3.6.4.For more details see here :
https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.1/hello-world/integrating-mfpf-sdk-in-cordova-applications/
Cordova-Android#3.6.4 works only with older tools of android such as Android target: android-23.In your case you have updated your platform tools to latest that is why you are seeing such error.
I have uploaded older tools of android here :
https://ibm.box.com/s/je74bzx73y6je65tdnpttyns4ih1zj7b
Rename or take back up of your existing tools in android sdk path.Put uploaded tools in android sdk path.
With Android P that is targeting to API 28 with MobileFirst 7.1 app ,you may face an error java.lang.NoClassDefFoundError: Failed resolution of: Lorg/apache/http/params/BasicHttpParams;
Work around is to add below tag in AndroidManifest.xml inside the tag:
Google's issue tracker
The same has been update in the
Android P blog
Could not find android.jar for API Level 26. This means the Android
SDK platform for API Level 26 is not installed. Either install it in
the Android SDK Manager (Tools > Open Android SDK Manager...), or
change your Xamarin.Android project to target an API version that is
installed. (C:\Program Files
(x86)\Android\android-sdk\platforms\android-O\android.jar missing.)
As you can see from below that I have the correct api sdk platforms installed but as you will notice on the error message, it is searching for an android-O directory.
Here is my directory which you will notice has everything in it but doesn't contain android-O
I looked in my visual studio project settings and here is what it shows for target framework
Does this mean that Visual Studio 2017 doesn't support Android SDK 26+?
I discovered that you can fix this issue with 2 steps:
Download and install Visual Studio 2017 Preview by going to https://www.visualstudio.com/vs/preview/
Download and install the Xamarin update extension on both versions of Visual Studio 2017 installed by going to https://developer.xamarin.com/recipes/cross-platform/ide/change_updates_channel/extension-gallery/ and follow the steps
If you're building for a Xamarin project, you may need to rename the folder in the SDK folder from "android-{alphabetOSVersion}" to "android-{numericOSVersion}" (IE change the folder "android-o" to "android-27").
This should be done in the C:\Program Files (x86)\Android\android-sdk\platforms folder.
I was getting a similar issue.
Severity Code Description Project File Line Suppression State
Error Could not find android.jar for API level 29. This means the
Android SDK platform for API level 29 is not installed. Either install
it in the Android SDK Manager (Tools > Android > Android SDK
Manager...), or change the Xamarin.Android project to target an API
version that is installed. (C:\Program Files
(x86)\Android\android-sdk\platforms\android-29\android.jar missing.)
The easy fix was to follow the steps mentioned in the error itself from your Visual Studio (I was using Visual Studio 2019).
Click on the Apply Changes button and then reload the project.
MVS 2017 does support Android SDK 26+,
Im using it with v15.3.3.
If you have MVS 2017 installed on your machine,make sure it's up to date
then download and install the Xamarin update extension.
Check out this guide
https://developer.xamarin.com/recipes/cross-platform/ide/change_updates_channel/extension-gallery/
And as a rule of thumb,whenever you get the error "Resolve the “Could not find android.jar for API Level XX” in Xamarin Studio" this are steps to follow to solve such an error
This happens when you target your project to a non-installed Android SDK platform, to fix this you have to install the right components.
Step 1:Target another Android Framework
On the project you have created right-click the project > Options
Go to the Xamarin project configurations
Then go to Build > General > Target framework, and select other Android target framework.
Xamarin project Android target framework
Step 2:Install the Android SDK you need
As the second option you can install the missing components needed to debug on the SDK Android platform; for this you have to go to:
Tools > Open Android SDK Manager
Android SDK Manager Option
Then look at the API Level number on the error or look at the version of the target framework as stated at the previous steps; then select to install the “SDK Platform” and press the “Install 1 package” button.
Choose the right Android SDK Platform
Accept license agreements
license agreements
With this you are ready, press F5 and you can debug now.
As specified here, I should not need to install ADT if I have Android Studio and SDK installed.
I'm trying to test this in response to a customer's question on whether or not you can use Android Studio instead of ADT. Because ADT is no longer supported as stated here.
Here's my steps:
install eclipse.
Install MobileFirst Studio v6.3 from eclipse marketplace.
Install Android Studio (which also installed Android SDK), able to launch Android Studio and run an empty app.
Specify the location of Android Studio in Window > Preferences > MobileFirst.
Create MFP project, add Android environment.
From menus select Run As > Build All Environments.
At this point the build failed. Do I still have to install ADT in order to be able to build?
UPDATE:
Error Log
[2015-01-30 12:50:22] Starting build process: application 'demo', all environments
[2015-01-30 12:50:29] FWLST1125W: Android build will fail because an Android SDK was not installed. Use the Android SDK Manager to install API level 19, configure your project to build with API level 19 by updating the Project Build Target in Project / Properties / Android dialog.
[2015-01-30 12:50:30] Application 'demo' with all environments build finished.
Because you selected the Run As > Build all, this will indeed give you the Warning you have mentioned since you do not have ADT installed. Because you do not have ADT installed, the usual generated Android project that Worklight/MFP generates for you will fail to generate.
If you want to open your project in Android Studio, you should right-click the Android environment and select Run As > Android Studio Project.
The project should then correctly open in Android Studio.
I had the same problem with the beta version (MFPF 6.3) for Windows. The solution was to install the Fix Pack 6.3.0.0-MFPF-StudioP2-IF201502141702.zip found here. After installation you must reconfigure the path of Android Studio (Windows > Preferences > MobileFirst)
I am not sure if this will be of help, as this is a very old post. Try pointing to android studio home and not to bin folder. Some thing like C:\IBM\Android Studio.
I have also faced the same issue and solved it by pointing to android studio home folder.