Note that there are some explanatory texts on larger screens.

plurals
  1. POResources on sibling sub module, Gradle project
    text
    copied!<p>I'm trying to migrate my company's project from Maven to Gradle, so far I've been able to convert all POMs to the corresponding build.gradle files, but I ran across an issue in a sub module when building.</p> <pre><code>- Core-UI ---- Utils ---- FieldPanels </code></pre> <p>The sub module FieldPanel uses colors and other resources defined in Utils. I tried adding the Utils project as a dependency, but it did not work, what am I missing?</p> <pre><code>/home/development/AndroidStudioProjects/com.project/core-ui/common.android.fieldpanels/build/bundles/debug/res/layout/base_summary_step_layout.xml:2: error: Error: No resource found that matches the given name (at 'background' with value '@color/wizard_summary_bg'). </code></pre> <p><strong>Utils gradle.build</strong></p> <pre><code>buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.2' } } apply plugin: 'android-library' android { sourceSets { main { manifest { srcFile 'AndroidManifest.xml' } res { srcDirs = [ 'res' ] } } } compileSdkVersion 15 buildToolsVersion '17.0' dependencies { compile group: 'com.company.ipos.android', name: 'commons.pos.micropos.api', version: '0.0.35-SNAPSHOT' compile group: 'org.slf4j', name: 'slf4j-api', version: '1.6.5' } } repositories { maven { credentials { username mavenUser password mavenPassword } url repoUrl } maven { credentials { username mavenUser password mavenPassword } url libsReleasesUrl } maven { credentials { username mavenUser password mavenPassword } url libsSnapshotsUrl } } </code></pre> <p><strong>fieldPanels gradle.build</strong></p> <pre><code>buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.5.2' } } apply plugin: 'android-library' repositories { maven { credentials { username mavenUser password mavenPassword } url repoUrl } maven { credentials { username mavenUser password mavenPassword } url libsReleasesUrl } maven { credentials { username mavenUser password mavenPassword } url libsSnapshotsUrl } } android { dependencies { compile group: 'com.company.ipos.android', name: 'commons.pos.micropos.api', version: '0.0.35-SNAPSHOT' //compile group: 'com.company.ipos.android', name: 'common.android.utils', version: '0.0.35-SNAPSHOT' compile project(":common.android.utils") compile group: 'org.slf4j', name: 'slf4j-api', version: '1.6.5' } sourceSets { main { manifest { srcFile 'AndroidManifest.xml' } res { srcDirs = [ 'res', ] } } } compileSdkVersion 15 buildToolsVersion '17.0' } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload