Note that there are some explanatory texts on larger screens.

plurals
  1. POProguard can't find referenced class when run "gradlew build" the first time
    text
    copied!<p>I'm using gradle to build my android project and ran into a rather strange problem. </p> <p>When I run "gradlew build" for the first time, build will break due to proguard can't find referenced class. However, when I run "gradlew build" again, build can successfully finish.</p> <pre><code>D:\project\abs-demo&gt;gradlew clean D:\project\abs-demo&gt;gradlew build // first time, fail D:\project\abs-demo&gt;gradlew build // second time, succeed </code></pre> <p>Error messages are as follows:</p> <pre><code>Warning: com.actionbarsherlock.sample.demos.ActionItems: can't find superclass or interface com.actionbarsherlock.app.SherlockActivity Warning: com.actionbarsherlock.sample.demos.ActionModes: can't find superclass or interface com.actionbarsherlock.app.SherlockActivity Warning: com.actionbarsherlock.sample.demos.ActionModes$AnActionModeOfEpicProportions: can't find superclass or interface com.actionbarsherlock.view.ActionMode$Callback Warning: com.actionbarsherlock.sample.demos.ActionModesNoActionBar: can't find superclass or interface com.actionbarsherlock.app.SherlockActivity Warning: com.actionbarsherlock.sample.demos.ActionModesNoActionBar$AnActionModeOfEpicProportions: can't find superclass or interface com.actionbarsherlock.view.ActionMode$Callback Warning: com.actionbarsherlock.sample.demos.ActionProviders: can't find superclass or interface com.actionbarsherlock.app.SherlockActivity Warning: com.actionbarsherlock.sample.demos.ActionProviders$SettingsActionProvider: can't find superclass or interface com.actionbarsherlock.view.ActionProvider .... </code></pre> <p>I'm using gradle 0.7. And my build.gralde:</p> <pre><code>apply plugin: 'android' repositories { mavenCentral() } dependencies { compile "com.android.support:support-v4:18.0.+" compile fileTree(dir: 'libs', include: '*.jar') compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar' } android { compileSdkVersion 19 buildToolsVersion "18.0.0" buildTypes { release { runProguard true proguardFile getDefaultProguardFile('proguard-android.txt') proguardFile 'proguard-project.txt' } } sourceSets { main { manifest.srcFile 'AndroidManifest.xml' java.srcDirs = ['src'] resources.srcDirs = ['src'] aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] assets.srcDirs = ['assets'] } // Move the tests to tests/java, tests/res, etc... instrumentTest.setRoot('tests') // Move the build types to build-types/&lt;type&gt; // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... // This moves them out of them default location under src/&lt;type&gt;/... which would // conflict with src/ being used by the main source set. // Adding new build types or product flavors should be accompanied // by a similar customization. debug.setRoot('build-types/debug') release.setRoot('build-types/release') } } </code></pre> <p><strong><p>I uploaded <a href="https://drive.google.com/file/d/0B3PMpiapRslMSDkyMGpBUnhqV1E/edit?usp=sharing" rel="nofollow">my project here</a>.</p></strong></p> <p>Do I do something wrong? Or it is a bug of gradle?</p>
 

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