johnuopini / gradle-getlocalization-plugin

A Gradle plugin for managing translations through GetLocalization.
MIT License
6 stars 2 forks source link

downloadTranslations tries to download everything again and fails #2

Open davidvavra opened 10 years ago

davidvavra commented 10 years ago

Hi, I updated to v1.1 of the plugin and the previous problem on Windows is solved. But it fails at the end for a different reason. Stacktrace:

Executing tasks: [downloadTranslations]

Configuration on demand is an incubating feature. Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0 :app:downloadTranslations Dowloading 'cs-CZ', progress 100.0% Dowloading 'de', progress 100.0% Dowloading 'es', progress 100.0% Dowloading 'fr', progress 100.0% Dowloading 'sk-SK', progress 96.0% Dowloading 'tr-TR', progress 94.0% Dowloading 'ca-AD', progress 100.0% Dowloading 'pt-BR', progress 96.0% Dowloading 'fi', progress 71.0% Dowloading 'sv', progress 100.0% Dowloading 'it', progress 100.0% Dowloading 'nl-BE', progress 100.0% Dowloading 'pt-PT', progress 97.0% Dowloading 'nl', progress 100.0% Dowloading 'es-419', progress 97.0% Dowloading 'da', progress 100.0% Dowloading 'pl-PL', progress 100.0% Dowloading 'ru', progress 84.0% Dowloading 'grk', progress 100.0% Dowloading 'hu-HU', progress 93.0% Dowloading 'vi', progress 93.0% Dowloading 'en', progress 100.0% Dowloading 'no', progress 90.0% Dowloading 'bg-BG', progress 93.0% Dowloading 'lt', progress 95.0% Dowloading 'cs-CZ', progress 100.0%

[Fatal Error] :1:1: Content is not allowed in prolog.

:app:downloadTranslations FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 1 mins 22.493 secs

flabbamann commented 10 years ago

I get the same "Content is not allowed in prolog" error at the end. The downloaded language files are there, and seem to be OK, but the task does not finish successfully. I checked the files I uploaded to getlocalization, and the translated files they provide, there are no characters before the prolog: <?xml version="1.0" encoding="utf-8"?>

so I think this is some sort of encoding-problem.

Im on Windows7 64Bit using Android Studio 0.8.12 64Bit

davidvavra commented 9 years ago

@johnuopini Any updates?

johnuopini commented 9 years ago

Can you post a stacktrace? I have no way to reproduce this

baole commented 9 years ago

Stacktrack running on MacOS

gradle downloadTranslations --stacktrace Parallel execution is an incubating feature. :boosterapp:downloadTranslations Dowloading 'fr', progress 67% Dowloading 'vi', progress 75% Dowloading 'id', progress 75% Dowloading 'cs-CZ', progress 75% Dowloading 'tr-TR', progress 56% Dowloading 'ja-JP', progress 99% Dowloading 'es', progress 64% Dowloading 'de', progress 75% Dowloading 'ru', progress 75% Dowloading 'nl', progress 59% Dowloading 'sr', progress 75% Dowloading 'it', progress 75% Dowloading 'es-419', progress 63% Dowloading 'pl-PL', progress 60% Dowloading 'ar', progress 75% Dowloading 'pt-PT', progress 63% Dowloading 'zh-CN', progress 75% Dowloading 'ko', progress 65% Dowloading 'hu-HU', progress 73% Dowloading 'uk', progress 67% Dowloading 'vi', progress 100% [Fatal Error] :1:1: Content is not allowed in prolog. :boosterapp:downloadTranslations FAILED

FAILURE: Build failed with an exception.

BUILD FAILED

Total time: 1 mins 50.798 secs

davidvavra commented 8 years ago

I have encountered the same problem today with the latest version. It's project-specific. The plugin works fine for my other project, but not for this one. I'm using the same build environment for both.

davidvavra commented 7 years ago

This library seems unmaintained so I released my fork to jcenter() which fixes this issue.

https://github.com/step-up-labs/gradle-getlocalization-plugin

You can add it by:

repositories {
    jcenter()
}
dependencies {
    classpath 'io.stepuplabs.getlocalization.gradle:gradle-getlocalization-plugin:1.2.1'
}