Nativescript Firebase Execution failed for task ':processF0F1DebugResources'


#1

Hey there,

I am creating a fresh project with firebase and I can’t even get it to work.

Here is what I did:

  1. Created a new project by doing
    tns create firebaseTest --appid com.mydomain.firebase

  2. Then I added the platform by doing
    tns platform add android

  3. Then I added the firebase plugin by doing
    tns plugin add nativescript-plugin-firebase

  4. I copied the google-services.json to app/App_Resources/Android/google-services.json.

  5. Then I tried to build the app using the following
    tns build android --compileSdk 23

Note that I am building for API level 23.

I get the following error

 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processF0F1DebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

I have the following in my android SDK

Things I have tried:

I have created multiple projects and tried this.
I have removed and add the plugins and platform.

This happens only after I add the plugin and doesnot happen without it.

Thanks


#2

Could we get the whole build log please?

Do you get a different result if you don’t specify the compileSdk version and allow the latest one to be used?

What is the build-tools version you use? It is recommended that compileSdk and build-tools match to avoid resource-crunching tools failure.


#3

Yes I get different result without compileSdk version.

I get the following without it

      at java.lang.Thread.run(Thread.java:745)
"Install Android SDK Platform 25" failed.

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'MyProject'.
> Failed to install the following SDK components:
  [Android SDK Platform 25]
  Please install the missing components using the SDK manager in Android Studio.

Here is the log file with --log option
Download here

I use build tool version 25.

I will be downloading and matching the build-tools version wiht complileSdk version as slow internet prevents me from updating frequently.

Do let me know if anything else is to be done in this issue?


#4

Ok thanks a lot @Pete.K

I have solved this. This is what I have done.

Matched my build-tools versions with the sdk level that I am building for.

Still I was getting "Install Android SDK Platform 25" failed. when I ran the build command. I checked I had no SDK Platform 25 installed in the SDK manager.

But an empty folder for SDK Platform 25 was present, which was causing this. Upon deleting the empty SDK Platform 25 folder I can now build without any errors.

The following

* What went wrong:
Execution failed for task ':processF0F1DebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt

was solved by build-tools versions with the sdk level and by adding path to aapt.exe in the system environment vaiables.

-Thanks