Skip to content
This repository has been archived by the owner on Jan 14, 2023. It is now read-only.

Adding google to repository list in buildscript.gradle. #73

Merged
merged 2 commits into from
Dec 26, 2018

Conversation

jubeira
Copy link

@jubeira jubeira commented Sep 22, 2018

This PR adds google repository to the buildscript. This is required for the latest Android Gradle plugin used in rosjava/android_core#286.

@jubeira jubeira merged commit 4d760fd into rosjava:kinetic Dec 26, 2018
@jubeira jubeira deleted the task/add_google_repo branch December 26, 2018 13:08
@jubeira jubeira restored the task/add_google_repo branch December 26, 2018 14:52
@jubeira
Copy link
Author

jubeira commented Jan 11, 2019

Hi @ABDULRaouf92; please see the conversation in rosjava/android_core#292 and #78.

You need an updated Gradle version for this to work; rosjava repos were recently updated to 4.10.2.

@Raouf-sawas
Copy link

Hi again @jubeira, thank you for the fast reply, Unfortunately it still giving the same error, although i have updated Gradle to 5.1. , do you have any further suggestion?

"Could not find method google() for arguments [] on repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler"

@Raouf-sawas
Copy link

Hi again @jubeira, thank you for the fast reply, Unfortunately it still giving the same error, although i have updated Gradle to 4.10.2., then 5.1. , do you have any further suggestion?

"Could not find method google() for arguments [] on repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler"

@jubeira
Copy link
Author

jubeira commented Jan 14, 2019

Hmm which Gradle have you updated? Note that you don't need to install Gradle in your system, as all these projects are using a Gradle wrapper. I haven't had this issue since I upgraded the wrapper to 4.10.

Check this SO answer for reference: https://stackoverflow.com/questions/45781489/error6-0-gradle-dsl-method-not-found-google

@Raouf-sawas
Copy link

I updated the one in Gradle wrapper, am building the android_core again totally from zero, but sill getting the same error. although that "compile" is deprecated, it should be replaced with "implementation" or do you think compile should work fine?

@jubeira
Copy link
Author

jubeira commented Jan 14, 2019

compile is deprecated, but it should still work out.
Are you using rosjava_build_tools from sources or from debs? Can you please try installing rosjava from source (following this tutorial), sourcing the workspace and rebuilding android_core again?

@Raouf-sawas
Copy link

Raouf-sawas commented Jan 14, 2019

rosjava is working, i have already installed it form the same link, I am using rosjava_build_tools sources

@Raouf-sawas
Copy link

before it failed, it gives the following warnings:

ros@ros-VirtualBox:~/android_core$ catkin_make
Base path: /home/ros/android_core
Source space: /home/ros/android_core/src
Build space: /home/ros/android_core/build
Devel space: /home/ros/android_core/devel
Install space: /home/ros/android_core/install

Running command: "make cmake_check_build_system" in "/home/ros/android_core/build"

Running command: "make -j2 -l2" in "/home/ros/android_core/build"

Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details

Configure project :android_acm_serial
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.
before it field
Configure project :android_benchmarks
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

Configure project :android_core_components
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

Configure project :android_tutorial_camera
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

Configure project :android_tutorial_image_transport
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

Configure project :android_tutorial_map_viewer
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

Configure project :android_tutorial_pubsub
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

Configure project :android_tutorial_teleop
WARNING: The specified Android SDK Build Tools version (25.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.2.1.
Android SDK Build Tools 28.0.3 will be used.
To suppress this warning, remove "buildToolsVersion '25.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools.

Task :android_core_components:compileReleaseJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Task :android_acm_serial:compileReleaseJavaWithJavac
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Task :android_tutorial_camera:compileReleaseJavaWithJavac
Note: /home/ros/android_core/src/android_core/android_tutorial_camera/src/org/ros/android/android_tutorial_camera/MainActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.10.2/userguide/command_line_interface.html#sec:command_line_warnings

BUILD SUCCESSFUL in 6m 57s
218 actionable tasks: 218 executed
Built target gradle-android_core
Starting a Gradle Daemon, 1 incompatible and 1 stopped Daemons could not be reused, use --status for details

FAILURE: Build failed with an exception.

Could not find method google() for arguments [] on repository container of type org.gradle.api.internal.artifacts.dsl.DefaultRepositoryHandler.

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

BUILD FAILED

@jubeira
Copy link
Author

jubeira commented Jan 15, 2019

I just went through the steps once again and I didn't find any issue; have you cleaned android_core workspace after you updated your rosjava installation and so forth?

This is what I did:

  • Rosjava installation tutorial from source, item 3.1.
  • Source the rosjava workspace built in the previous step (source ~/rosjava/devel/setup.bash).
  • Create a workspace for android_core and clone the repository:
mkdir -p ~/android_core_ws/src
cd ~/android_core_ws/src
git clone https://github.com/rosjava/android_core
  • Export ANDROID_HOME variable to where your SDK is (I had installed SDK versions and build tools with Android Studio beforehand):
export ANDROID_HOME=~/Android/Sdk
  • Build android_core:
cd ~/android_core_ws
catkin_make

Within 20 seconds I had android_core compiled. Following these steps using rosjava from source and a clean start for android_core still don't work for you?

@Raouf-sawas
Copy link

it worked perfectly, thank you for the help

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants