Cordova failing to build on android - android

I'm attempting to build my android project via terminal. I have the /android-sdk/macosx in my downloads and I have the API 23 installed. I also have Google Play Services and Google Respository installed in Extras (within SDK Manager).
I'm receiving a build error when attempting to cordova build android as seen below. Am I missing something in my build setup? Any help is appreciated.

I solved this by running the SDK manager -> update for Android Support Repository -> Android Support Library

Related

Error for SDK tools Android Studio

I've started to learn to make Android apps recently but I've faced a problem in launching Android Studio!
I downloaded android studio and also downloaded SDK tools from here ( I downloaded them separately ) and when I give SDK path to the Studio, it installs SDK successfully but when the project opens, it says that some Android SDK tools are missing!
Error :Gradle sync failed: Failed to find target with hash string
'android-26' in: E:\android-sdk
I'm confused because I can find no problem in my downloading and installing but there is an error!
What should I do?
install android studio and sdk also( not separately) then create a new project and build them, and if it work then, you can move your sdk file and then connect the path your sdk.
i think you tried separately and some how any data are being missing .

Unable to create mfp cordova project in Android 28

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

Google Play services: Error while building ionic android app

I am creating new ionic application. In this app I have added Google Play services package revision no. 31. Also added package to my app cordova plugin add cordova-plugin-googleplus. This is used for google plus authentication.
So now I am facing problem while building android app using ionic build android. It gives me following error,
But when I remove the package cordova plugin remove cordova-plugin-googleplus and build the app it succeeds.
Is it because of the revision number of googleplus package?
The problem is because you Android SDK does not have Google Play Services installed. Therefore, it cannot compile your application which has Google Play Services reference (and Android SDK does not have those). Go to your Android SDK Manager and install Google Play Services for your android API version. PS you can see those errors in your console.
Found the solution,
I have downgrade the following packages to previous revision.
Remember you need to restart your machine if you are using windows to reflect changes in android sdk.
The error comes because this app is not using androidX but these plugins solve errors.Use these two plugin. Its solved my issueionic cordova plugin add cordova-plugin-androidx && ionic cordova plugin add cordova-plugin-androidx-adapter

I updated my android sdk to include the Google Api's but adb connection is failing

I updated my android sdk to include the Google Api's but adb connection is failing and am getting the following message
android `sdk` requires android developer toolkit version 23.0.0 or a bove current version is 22.0.0.v201305140200-- 675183.
I have tried checking for updates but failed
Are you still using Eclipse? I guess you need to update Eclipse ADT as well...

Gradle can't find play services after update android studio

I updated my android studio this morning and updated my whole android sdk. Including the extra's like play services and etc...
I always get:
Error:Could not find com.google.android.gms:play-services:4.4.52.
Required by:
ar-android:Ar:unspecified
Search in build.gradle files
Can someone help me out on this?
I had the same problem and solved it downloading a package from the Android SDK mananger.
Open the SDK Manager (from Eclipse or Android or the standalone version) and select the package 'Google Play Services'.

Categories

Resources