code: private void generateCorrectRJavaForApklibDependencies( ResourceClassGenerator resourceGenerator )
              throws MojoExecutionException
      {
          getLog().debug( "" );
          getLog().debug( "#generateCorrectRJavaFoApklibDeps" );
  
          // Generate R.java for apklibs
          // Compatibility with Apklib which isn't present in AndroidBuilder
          getLog().debug( "Generating Rs for apklib deps of project " + project.getArtifact() );
          final Set<Artifact> apklibDependencies = getTransitiveDependencyArtifacts( APKLIB );
          for ( final Artifact artifact : apklibDependencies )
          {
              getLog().debug( "Generating apklib R.java for " + artifact.getArtifactId() + "..." );
              generateRForApkLibDependency( artifact );
          }
  
          // Generate corrected R.java for APKLIB dependencies, but only if this is an APK build.
          if ( !apklibDependencies.isEmpty() && APK.equals( project.getArtifact().getType() ) )
          {
              // Generate R.java for each APKLIB based on R.txt
              getLog().debug( "" );
              getLog().debug( "Rewriting R files for APKLIB dependencies : " + apklibDependencies );
              resourceGenerator.generateLibraryRs( apklibDependencies );
          }
      }
docs: Generate correct R.java for apklibs dependencies of a current project
  
  @throws MojoExecutionException