MobileChromeApps / mobile-chrome-apps

Chrome apps on Android and iOS
BSD 3-Clause "New" or "Revised" License
2.5k stars 347 forks source link

Error with `cca run android --device` using CCA 0.5.1 #543

Open felquis opened 9 years ago

felquis commented 9 years ago

Hi guys, I'm using CCA 0.5.1 in production to build a hybrid app to iOS and Android, which Android is our main focus to improve performance in our app.

But my build isn't working, I'm getting this error:

screen shot 2015-04-02 at 16 44 24

text:

➜  amo (dev) ✗ cca run android --device 
cca v0.5.1
Running command: /Users/felquis/Documents/projects/amo/hooks/before_prepare/cca-check.js /Users/felquis/Documents/projects/amo
Running command: /Users/felquis/Documents/projects/amo/platforms/android/cordova/run --device

FAILURE: Build failed with an exception.

* Where:
Script '/Users/felquis/Documents/projects/amo/platforms/android/org.chromium.i18n/app-copy-locales.gradle' line: 7

* What went wrong:
A problem occurred evaluating script.
> Could not find property 'cdvPluginPostBuildExtras' on root project 'android'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 2.023 secs

/Users/felquis/Documents/projects/amo/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error code 1 for command: /Users/felquis/Documents/projects/amo/platforms/android/gradlew with args: assembleArmv7Debug,-b,/Users/felquis/Documents/projects/amo/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-x,lint,-x,lintVitalX86Release,-x,lintVitalArmv7Release,-x,compileLint,-x,copyReleaseLint,-x,copyDebugLint
ERROR running one or more of the platforms: Error: /Users/felquis/Documents/projects/amo/platforms/android/cordova/run: Command failed with exit code 8
You may not have the required environment or OS to run this project
➜  amo (dev) ✗ 

Anyone can help me with this?

PS: I can't update to 0.6.0 right now because I need to support Android 4.4+ and 0.6.0 set min sdk to 21 :/

Thanks.

agrieve commented 9 years ago

Sorry for the rough update on 0.6.0 :(. We've made changes so that it shouldn't happen again.

For this error, try installing an older version of the i18n plugin, or maybe just try deleting the reference to that gradle file from the platforms/android/project.properties file.

That said, updating to 0.6.0 would obviously be preferred. It does set the targetSdk to 21, but I believe still has the minSdk set to 14. We've also update the instructions here to show that you can now set the minSdk via a command-line flag.

kctang commented 9 years ago

I got the same issue. Tried to downgrade org.chromium.i18n from 2.0.0 to 1.1.1.

Build is successful but I have not tried running (not expecting any problem). Thanks guys!

felquis commented 9 years ago

Hi @kctang how did you change the version? It's something manual or it can be automated?

2015-04-04 21:47 GMT-03:00 kctang notifications@github.com:

I got the same issue. Tried to downgrade org.chromium.i18n http://plugins.cordova.io/#/package/org.chromium.i18n from 2.0.0 to 1.1.1.

Build is successful but I have not tried running (not expecting any problem). Thanks guys!

— Reply to this email directly or view it on GitHub https://github.com/MobileChromeApps/mobile-chrome-apps/issues/543#issuecomment-89695026 .

Felquis Gimenes - Front-end felquis.com +55 011 95980 2233

kctang commented 9 years ago

@felquis, I posted the comment after a quick test on a clean/blank cca 0.5.1 project, so it was done manually using ./cca from the cca project directory instead of via grunt cordovacli.

# the remove command gave some warning about the i18n plugin is required but works anyway
./cca plugin remove org.chromium.i18n
# add the previous version (i guessed the version from http://plugins.cordova.io/#/package/org.chromium.i18n)
./cca plugin add org.chromium.i18n@1.1.1

Will try this on my cordovacli based project in the next few days.

felquis commented 9 years ago

Nice, thanks :) Em 05/04/2015 12:29, "kctang" notifications@github.com escreveu:

@felquis https://github.com/felquis, I posted the comment after a quick test on a clean/blank cca 0.5.1 project, so it was done manually using ./cca from the cca project directory instead of via grunt cordovacli.

the remove command gave some warning about the i18n plugin is required but works anyway

./cca plugin remove org.chromium.i18n

add the previous version (i guessed the version from http://plugins.cordova.io/#/package/org.chromium.i18n)

./cca plugin add org.chromium.i18n@1.1.1

Will try this on my cordovacli based project in the next few days.

— Reply to this email directly or view it on GitHub https://github.com/MobileChromeApps/mobile-chrome-apps/issues/543#issuecomment-89792496 .