Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

building Cordova app for Android error after updating raix:push to the latest #1156

Closed
solo999 opened this issue Oct 17, 2015 · 14 comments
Closed

Comments

@solo999
Copy link

solo999 commented Oct 17, 2015

After merging e83ee60 commit, I've got an error about building Cordova app for platform Android:

=> Errors executing Cordova commands:         

While building Cordova app for platform Android:
Error: /Users/vb/Sites/RocketChat/.meteor/local/cordova-build/platforms/android/cordova/build: Command failed with exit
code 8 Error output:

/Users/vb/Sites/RocketChat/.meteor/local/cordova-build/platforms/android/src/com/adobe/phonegap/push/GCMIntentService.java:483:
error: cannot find symbol
mBuilder.setColor(iconColor);
^
symbol:   method setColor(int)
location: variable mBuilder of type Builder
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileReleaseJava'.
> Compilation failed; see the compiler error output for details.

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


/Users/vb/Sites/RocketChat/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /Users/vb/Sites/RocketChat/.meteor/local/cordova-build/platforms/android/gradlew with args:
cdvBuildRelease,-b,/Users/vb/Sites/RocketChat/.meteor/local/cordova-build/platforms/android/build.gradle,-Dorg.gradle.daemon=true
at ChildProcess.whenDone
(/Users/vb/.meteor/packages/meteor-tool/.1.1.9.1uwo8qg++os.osx.x86_64+web.browser+web.cordova/mt-os.osx.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Process.ChildProcess._handle.onexit (child_process.js:833:5)

This it is probably related to the issue in Phonegap Push Plugin: phonegap/phonegap-plugin-push#51 and can be temporarily solved by returning raix:push back to 2.6.13-rc.1 version

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@macdonst
Copy link

@solo999 you'll need to update your Android SDK as per:

https://github.com/phonegap/phonegap-plugin-push#compiling

@gmsecrieru
Copy link
Contributor

Is this fixed by updating Android SDK? Should we close this issue?

@macdonst
Copy link

@gmsecrieru Yes, if you update to Android Support Repository 20 or greater and Android Support Library 23 or greater then this error will go away.

@Tharnas
Copy link

Tharnas commented Oct 21, 2015

@solo999
Copy link
Author

solo999 commented Oct 22, 2015

@macdonst
my Android Support Repository version is 24.0.0 and Android Support Library version is 23.1.0

@Tharnas
I have built latest Rocket.Chat Android from docker image meteor12androidbuilder and got the same error.

@gmsecrieru
I am not sure that it fixed by updating to Android Support Repository 20 or greater and Android Support Library 23. At least I have not managed to get rid of that error if raix:push package is the latest one (3.0.1)

@solo999
Copy link
Author

solo999 commented Oct 22, 2015

Update:
if I add Crosswalk to meteor12androidbuilder before build, then there is no mBuilder.setColor(iconColor); error, but still it can not build apk:

root@80ec6c347a5d:/home/Rocket.Chat# meteor build --server http://demo.rocket.chat ./build      

WARNING: The output directory is under your source tree.

=> Errors executing Cordova commands:                                              

While building Cordova app for platform Android:
Error: /home/Rocket.Chat/.meteor/local/cordova-build/platforms/android/cordova/build: Command failed with
exit code 8 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:1.0.0+.
Required by:
:android:unspecified
> Failed to list versions for com.android.tools.build:gradle.
> Unable to load Maven meta-data from
https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml.
> Could not GET
'https://repo1.maven.org/maven2/com/android/tools/build/gradle/maven-metadata.xml'.
> repo1.maven.org: unknown error

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


/home/Rocket.Chat/.meteor/local/cordova-build/platforms/android/cordova/node_modules/q/q.js:126
throw e;
^
Error code 1 for command: /home/Rocket.Chat/.meteor/local/cordova-build/platforms/android/gradlew with args:
cdvBuildRelease,-b,/home/Rocket.Chat/.meteor/local/cordova-build/platforms/android/build.gradle,-Dorg.gradle.daemon=true
at ChildProcess.whenDone
(/root/.meteor/packages/meteor-tool/.1.1.9.ltydx3++os.linux.x86_64+web.browser+web.cordova/mt-os.linux.x86_64/dev_bundle/lib/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:766:16)
at Process.ChildProcess._handle.onexit (child_process.js:833:5)

@Sing-Li
Copy link
Member

Sing-Li commented Oct 22, 2015

@solo999 For meteor12androidbuilder, please make sure you have all pre-reqs here, including the (large) machine and free disk requirements:

https://github.com/RocketChat/Rocket.Chat/wiki/How-to-Build-Rocket.Chat-for-Android

ALSO... please make 100% sure that you follow the readme here word-for-word...

https://hub.docker.com/r/rocketchat/meteor12androidbuilder/

In general, Meteor add, removal or change of platforms is not (yet) clean. You must start clean for things to work properly. You do not need, or want your own Android SDK, when using meteor12androidbuilder - the Docker image contains a properly configured and working one.

@solo999
Copy link
Author

solo999 commented Oct 22, 2015

@Sing-Li

I have Mac Book Air 8Gb and 100Gb SSD hard disk free.
I have followed https://hub.docker.com/r/rocketchat/meteor12androidbuilder/ readme 100% 2 times (with or without Crosswalk). First time the result was the same as my first post, 2nd time - as in my previous post.
I have run build 3rd time with

raix:push*  downgraded from 3.0.1 to 2.6.13-rc.1

and the it run smoothly without any errors.

@gmsecrieru
Copy link
Contributor

I believe 2.6.13-rc.1 was created by @rodrigok and we didn't test 3.x properly before updating. Maybe we should just do away with 3.x.

cc @engelgabriel

@Sing-Li
Copy link
Member

Sing-Li commented Oct 22, 2015

@solo999. Thanks for working this out with us. Your effort is most appreciated.

I have spent over a week to encapsulate the new android build environment. The builder will soon be part of our CI/CD pipeline (once we get a powerful server to do it in parallel).

@macdonst
Copy link

If you don't see the setColor method in NotificationCompat.Builder then it means you are not picking up the latest version of the Android Support Library. It's also possible that another part of this app is including an older version of android-support-v13.jar.

@marceloschmidt
Copy link
Member

This is open for so long... hasn't this been fixed yet?

@geekgonecrazy
Copy link
Contributor

Closing due to inactivity. Please let us know if you're still having issues. Or reach out to us on the demo server. We'll be glad to help you Thanks!

@developer0017
Copy link

I got this error when run cordova project on terminal

Error: /Volumes/Working/Development/Cordova/plugin/opcv/platforms/android/gradlew: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • Where:
    Build file '/Volumes/Working/Development/Cordova/plugin/opcv/platforms/android/build.gradle' line: 253

  • What went wrong:
    A problem occurred evaluating root project 'android'.

    Project with path ':androidOpenCVExample' could not be found in root project 'android'.

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

How can I resolve this?

Shailesh351 added a commit to Shailesh351/Rocket.Chat that referenced this issue Apr 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants