This is a migrated thread and some comments may be shown as answers.

Error Building

3 Answers 88 Views
Command-Line Interface
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Ste
Top achievements
Rank 1
Ste asked on 19 May 2016, 07:39 AM

Hi,

I have been trying to update my app to Cordova 4.0.0, but once I tried to build I got several errors, in particular this one which I can not understand what happened and how to fix it:

Project "PirateRoaming.tmp.proj" (default targets):
Warning: Cannot include the following item(s) in your application: .DS_Store;Plugins\AppsFlyer-v.3.3.0\.gitignore;Plugins\cordova-plugin-contacts-master\.gitignore;Plugins\cordova-plugin-geolocation-master\.gitignore;Plugins\cordova-plugin-geolocation-master\.travis.yml;Plugins\cordova-plugin-statusbar-master\.travis.yml;Plugins\Cordova-sqlite-storage-master-rc\.gitignore;Plugins\Cordova-sqlite-storage-master-rc\.travis.yml;Plugins\Cordova-sqlite-storage-master-rc\spec\.cordova\config.json;Plugins\Cordova-sqlite-storage-master-rc\spec\platforms\.gitignore;Plugins\Cordova-sqlite-storage-master-rc\spec\plugins\.gitignore;Plugins\Cordova-sqlite-storage-master-rc\src\external\.gitignore;Plugins\ionic-plugins-keyboard-master\.gitignore;Plugins\ionic-plugins-keyboard-master\src\blackberry10\native\.cproject;Plugins\ionic-plugins-keyboard-master\src\blackberry10\native\.project;Plugins\Phonegap-SMS-master\.gitignore. The build system treats items with a leading dot as hidden files or directories and does not process them. If you want to include these items in your application package, rename them and rebuild your app.
android Build Tooling revision 2016.05.03.3r
Warning: Note: Some input files use or override a deprecated API.
Warning: Note: Recompile with -Xlint:deprecation for details.
Warning: Unknown source file : warning: string 'common_android_wear_notification_needs_update_text' has no default translation.
Unknown source file : warning: string 'common_android_wear_update_text' has no default translation.
Warning: Unknown source file : warning: string 'common_android_wear_update_title' has no default translation.
Unknown source file : warning: string 'common_open_on_phone' has no default translation.
Warning: Note: Some input files use or override a deprecated API.
Warning: Note: Recompile with -Xlint:deprecation for details.
Warning: Unknown source file : warning: string 'common_android_wear_notification_needs_update_text' has no default translation.
Unknown source file : warning: string 'common_android_wear_update_text' has no default translation.
Warning: Unknown source file : warning: string 'common_android_wear_update_title' has no default translation.
Unknown source file : warning: string 'common_open_on_phone' has no default translation.
Warning: Unknown source file : /tmp/builds/R081CrVuLcqmanpyWP/app/build/intermediates/res/merged/armv7/debug/drawable-hdpi-v4/common_full_open_on_phone.png: error: Duplicate file.
Unknown source file : /tmp/builds/R081CrVuLcqmanpyWP/app/build/intermediates/res/merged/armv7/debug/drawable-hdpi/common_full_open_on_phone.png: Original is here. The version qualifier may be implied.
Warning: FAILURE: Build failed with an exception.
Warning: * What went wrong:
Execution failed for task ':processArmv7DebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/home/builder/android-sdk-linux/build-tools/23.0.1/aapt'' finished with non-zero exit value 1

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Warning: /tmp/builds/R081CrVuLcqmanpyWP/app/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /tmp/builds/R081CrVuLcqmanpyWP/app/gradlew with args: cdvBuildDebug,-b,/tmp/builds/R081CrVuLcqmanpyWP/app/build.gradle,-Dorg.gradle.daemon=true,-PcdvBuildArch=armv7,-PcdvBuildMultipleApks=true
Error: Build failed during execution
Error: 'Build failed with error code 1'
Done building project "PirateRoaming.tmp.proj" -- FAILED.


What can I do?

Thanks

3 Answers, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 23 May 2016, 09:10 AM
Hello Ste,

Thank you for contacting us.

Based on the output that you've sent, it looks like there are some issues with your images: drawable-hdpi-v4/common_full_open_on_phone.png - it is duplicated, which causes Android's aapt to fail during execution. Can you check if you have more than one files with this name ?

Also I've noticed that you are trying to migrate your project to Cordova 4.0.0. I'll try to explain most common errors that can raise during migration from Cordova 3.7.0 to newer version.

Please note that there's a huge difference between Cordova 4.0.0 and Cordova 3.7.0 and it's the names of the plugins. AppBuilder will set correct names of the plugins you've selected, but in case you have some custom plugins (based on your logs I believe you have such plugins), you have to update them to their latest versions. In case this is not possible, you can manually update the plugin.xml files of the custom plugins (inside Plugins directory) to use correct dependencies (in case they have such). For example the following line:
<dependency id="org.apache.cordova.dialogs"/>

should be changed to: 
<dependency id="cordova-plugin-dialogs"/>

Here's a short list of the new plugin names:
{ "oldName": "org.apache.cordova.battery-status", "newName""cordova-plugin-battery-status" },
{ "oldName": "org.apache.cordova.camera", "newName""cordova-plugin-camera" },
{ "oldName": "org.apache.cordova.console", "newName""cordova-plugin-console" },
{ "oldName": "org.apache.cordova.contacts", "newName""cordova-plugin-contacts" },
{ "oldName": "org.apache.cordova.device", "newName""cordova-plugin-device" },
{ "oldName": "org.apache.cordova.device-motion", "newName""cordova-plugin-device-motion" },
{ "oldName": "org.apache.cordova.device-orientation", "newName""cordova-plugin-device-orientation" },
{ "oldName": "org.apache.cordova.dialogs", "newName""cordova-plugin-dialogs" },
{ "oldName": "org.apache.cordova.file", "newName""cordova-plugin-file" },
{ "oldName": "org.apache.cordova.file-transfer", "newName""cordova-plugin-file-transfer" },
{ "oldName": "org.apache.cordova.geolocation", "newName""cordova-plugin-geolocation" },
{ "oldName": "org.apache.cordova.globalization", "newName""cordova-plugin-globalization" },
{ "oldName": "org.apache.cordova.inappbrowser", "newName""cordova-plugin-inappbrowser" },
{ "oldName": "org.apache.cordova.media", "newName""cordova-plugin-media" },
{ "oldName": "org.apache.cordova.media-capture", "newName""cordova-plugin-media-capture" },
{ "oldName": "org.apache.cordova.network-information", "newName""cordova-plugin-network-information" },
{ "oldName": "org.apache.cordova.splashscreen", "newName""cordova-plugin-splashscreen" },
{ "oldName": "org.apache.cordova.statusbar", "newName""cordova-plugin-statusbar" },
{ "oldName": "org.apache.cordova.vibration", "newName""cordova-plugin-vibration" },
{ "oldName": "org.apache.cordova.keyboard", "newName""org.apache.cordova.labs.keyboard" }

Also, for Cordova 4.0.0 we have updated the minimum required sdk version to 14, so in case you have edited your AndroidManifest.xml (in App_Resources/Android/AndroidManifest.xml), make sure to set:

<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21"/>

Hope this will help you to migrate your project. Feel free to contact us in case you have any problems or concerns.

Regards,
Rosen Vladimirov
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
0
Ste
Top achievements
Rank 1
answered on 23 May 2016, 03:36 PM

Rosen, thanks for your reply.

I do have multiple files with that same name inside the /Applications/MobileDevelopment/android-sdk-macosx/extras/google/google_play_services/libproject/google-play-services_lib/res/ path, but each inside a different drawable folder (like drawable-hdpi, drawable-xdpi, drawable-xxhdpi, etc.), isn't that normal for android?

However, since I am encountering so much errors/problems with this update I decided it is probably worth it to try to update directly to Cordova 5.0.0. Are there any additional or different common errors for that?

I posted (sorry I messed things up a little because it is not possible to edit posted posts) a couple more errors I encountered here and here. Could you please help me on those too (particularly on the second as I can not relate it to any particular plugin).

Thanks again.

0
Rosen Vladimirov
Telerik team
answered on 26 May 2016, 05:53 AM
Hello Ste,

It's normal for Android projects to have image with same name in a different drawable directory. Based on the error I've assumed it's been duplicated somewhere.

Anyway, I've already answered your other two questions in the other forum posts and I've noticed you've sent your project in another thread. I'll check it on my side and I'll continue the conversation there.

Hope this helps.

Regards,
Rosen Vladimirov
Telerik
 

Visit the Telerik Verified Plugins Marketplace and get the custom Cordova plugin you need, already tweaked to work seamlessly with AppBuilder.

 
Tags
Command-Line Interface
Asked by
Ste
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Ste
Top achievements
Rank 1
Share this question
or