owncloud / android

:phone: The ownCloud Android App
GNU General Public License v2.0
3.82k stars 3.05k forks source link

Can't build #829

Closed CyberShadow closed 8 years ago

CyberShadow commented 9 years ago

I can't build this project on Windows any way I try.

If I try to use ant, I get compiler errors:

C:\Projects\Extern\owncloud\android> ant debug
Buildfile: C:\Projects\Extern\owncloud\android\build.xml

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 24.0.2
 [checkenv] Installed at C:\Program Files (x86)\Android\android-sdk

-setup:
     [echo] Project Name: ownCloud
  [gettype] Project Type: Application

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 20.0.0
     [echo] Resolving Build Target for ownCloud...
[gettarget] Project Target:   Android 4.4.2
[gettarget] API level:        19
     [echo] ----------
     [echo] Creating output directories if needed...
    [mkdir] Created dir: C:\Projects\Extern\owncloud\android\bin\rsObj
    [mkdir] Created dir: C:\Projects\Extern\owncloud\android\bin\rsLibs
     [echo] ----------
     [echo] Resolving Dependencies for ownCloud...
[dependency] Library dependencies:
[dependency]
[dependency] ------------------
[dependency] Ordered libraries:
[dependency]
[dependency] ------------------
     [echo] ----------
     [echo] Building Libraries with 'debug'...

nodeps:

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 24.0.2
 [checkenv] Installed at C:\Program Files (x86)\Android\android-sdk

-setup:
     [echo] Project Name: owncloud-android-library
  [gettype] Project Type: Android Library

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 20.0.0
     [echo] Resolving Build Target for owncloud-android-library...
[gettarget] Project Target:   Android 4.4.2
[gettarget] API level:        19
     [echo] ----------
     [echo] Creating output directories if needed...
     [echo] ----------
     [echo] Resolving Dependencies for owncloud-android-library...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------

-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Found new input file
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.

-pre-compile:

-compile:
     [echo] Creating library output jar file...

-post-compile:
     [echo] Copying jar file for binary distribution

-obfuscate:

-dex:
     [echo] Library project: do not convert bytecode...

-crunch:
   [crunch] Crunching PNG Files in source dir: C:\Projects\Extern\owncloud\android\owncloud-android-library\res
   [crunch] To destination dir: C:\Projects\Extern\owncloud\android\owncloud-android-library\bin\res
   [crunch] Crunched 0 PNG files to update cache

-package-resources:
     [echo] Library project: do not package resources...

-package:
     [echo] Library project: do not package apk...

-post-package:

-do-debug:
     [echo] Library project: do not create apk...
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\owncloud-android-library\bin\build.prop
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\owncloud-android-library\bin\build.prop
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\owncloud-android-library\bin\build.prop
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\owncloud-android-library\bin\build.prop

-post-build:

debug:

nodeps:

-set-mode-check:

-set-debug-files:

-check-env:
 [checkenv] Android SDK Tools Revision 24.0.2
 [checkenv] Installed at C:\Program Files (x86)\Android\android-sdk

-setup:
     [echo] Project Name: ActionBarSherlock
  [gettype] Project Type: Android Library

-set-debug-mode:

-debug-obfuscation-check:

-pre-build:

-build-setup:
[getbuildtools] Using latest Build Tools: 20.0.0
     [echo] Resolving Build Target for ActionBarSherlock...
[gettarget] Project Target:   Android 4.0
[gettarget] API level:        14
     [echo] ----------
     [echo] Creating output directories if needed...
     [echo] ----------
     [echo] Resolving Dependencies for ActionBarSherlock...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.

-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Found Deleted Target File
     [aapt] Generating resource IDs...
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] No need to generate new BuildConfig.

-pre-compile:

-compile:
    [javac] Compiling 1 source file to C:\Projects\Extern\owncloud\android\actionbarsherlock\library\bin\classes
    [javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
    [javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
    [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
    [javac] 3 warnings
     [echo] Creating library output jar file...

-post-compile:

-obfuscate:

-dex:
     [echo] Library project: do not convert bytecode...

-crunch:
   [crunch] Crunching PNG Files in source dir: C:\Projects\Extern\owncloud\android\actionbarsherlock\library\res
   [crunch] To destination dir: C:\Projects\Extern\owncloud\android\actionbarsherlock\library\bin\res
   [crunch] Crunched 0 PNG files to update cache

-package-resources:
     [echo] Library project: do not package resources...

-package:
     [echo] Library project: do not package apk...

-post-package:

-do-debug:
     [echo] Library project: do not create apk...
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\actionbarsherlock\library\bin\build.prop
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\actionbarsherlock\library\bin\build.prop
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\actionbarsherlock\library\bin\build.prop
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\actionbarsherlock\library\bin\build.prop

-post-build:

debug:

-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Found Deleted Target File
     [aapt] Generating resource IDs...
     [aapt] aapt: warning: string 'move_choose_button_text' has no default translation in C:\Projects\Extern\owncloud\android\owncloud-android-library\res; fo
und: de_CH
     [echo] ----------
     [echo] Handling BuildConfig class...
[buildconfig] Generating BuildConfig class.

-pre-compile:

-compile:
    [javac] Compiling 123 source files to C:\Projects\Extern\owncloud\android\bin\classes
    [javac] warning: [options] source value 1.5 is obsolete and will be removed in a future release
    [javac] warning: [options] target value 1.5 is obsolete and will be removed in a future release
    [javac] warning: [options] To suppress warnings about obsolete options, use -Xlint:-options.
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\activity\OnEnforceableRefreshListener.java:3: error: cannot find symbol
    [javac] import android.support.v4.widget.SwipeRefreshLayout;
    [javac]                                 ^
    [javac]   symbol:   class SwipeRefreshLayout
    [javac]   location: package android.support.v4.widget
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\activity\OnEnforceableRefreshListener.java:5: error: package SwipeRefreshLayout do
es not exist
    [javac]     public interface OnEnforceableRefreshListener extends SwipeRefreshLayout.OnRefreshListener {
    [javac]                                                                             ^
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\OCFileListFragment.java:27: error: cannot find symbol
    [javac] import android.support.v4.widget.SwipeRefreshLayout;
    [javac]                                 ^
    [javac]   symbol:   class SwipeRefreshLayout
    [javac]   location: package android.support.v4.widget
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:24: error: cannot find symbol
    [javac] import android.support.v4.widget.SwipeRefreshLayout;
    [javac]                                 ^
    [javac]   symbol:   class SwipeRefreshLayout
    [javac]   location: package android.support.v4.widget
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:57: error: cannot find symbol
    [javac]     private SwipeRefreshLayout mRefreshLayout;
    [javac]             ^
    [javac]   symbol:   class SwipeRefreshLayout
    [javac]   location: class ExtendedListFragment
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:58: error: cannot find symbol
    [javac]     private SwipeRefreshLayout mRefreshEmptyLayout;
    [javac]             ^
    [javac]   symbol:   class SwipeRefreshLayout
    [javac]   location: class ExtendedListFragment
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:300: error: cannot find symbol
    [javac]     private void onCreateSwipeToRefresh(SwipeRefreshLayout refreshLayout) {
    [javac]                                         ^
    [javac]   symbol:   class SwipeRefreshLayout
    [javac]   location: class ExtendedListFragment
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileDownloader.java:422: error: cannot find symbol
    [javac]                 .setProgress(100, 0, download.getSize() < 0)
    [javac]                 ^
    [javac]   symbol:   method setProgress(int,int,boolean)
    [javac]   location: class Builder
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileDownloader.java:443: error: cannot find symbol
    [javac]         mNotificationManager.notify(R.string.downloader_download_in_progress_ticker, mNotificationBuilder.build());
    [javac]                                                                                                          ^
    [javac]   symbol:   method build()
    [javac]   location: variable mNotificationBuilder of type Builder
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileDownloader.java:454: error: cannot find symbol
    [javac]             mNotificationBuilder.setProgress(100, percent, totalToTransfer < 0);
    [javac]                                 ^
    [javac]   symbol:   method setProgress(int,int,boolean)
    [javac]   location: variable mNotificationBuilder of type Builder
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileDownloader.java:458: error: cannot find symbol
    [javac]             mNotificationManager.notify(R.string.downloader_download_in_progress_ticker, mNotificationBuilder.build());
    [javac]                                                                                                              ^
    [javac]   symbol:   method build()
    [javac]   location: variable mNotificationBuilder of type Builder
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileDownloader.java:488: error: cannot find symbol
    [javac]             .setProgress(0, 0, false);
    [javac]             ^
    [javac]   symbol:   method setProgress(int,int,boolean)
    [javac]   location: class Builder
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileDownloader.java:514: error: cannot find symbol
    [javac]             mNotificationManager.notify(tickerId, mNotificationBuilder.build());
    [javac]                                                                       ^
    [javac]   symbol:   method build()
    [javac]   location: variable mNotificationBuilder of type Builder
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileUploader.java:705: error: cannot find symbol
    [javac]                 .setProgress(100, 0, false)
    [javac]                 ^
    [javac]   symbol:   method setProgress(int,int,boolean)
    [javac]   location: class Builder
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileUploader.java:718: error: cannot find symbol
    [javac]         mNotificationManager.notify(R.string.uploader_upload_in_progress_ticker, mNotificationBuilder.build());
    [javac]                                                                                                      ^
    [javac]   symbol:   method build()
    [javac]   location: variable mNotificationBuilder of type Builder
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileUploader.java:728: error: cannot find symbol
    [javac]             mNotificationBuilder.setProgress(100, percent, false);
    [javac]                                 ^
    [javac]   symbol:   method setProgress(int,int,boolean)
    [javac]   location: variable mNotificationBuilder of type Builder
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileUploader.java:732: error: cannot find symbol
    [javac]             mNotificationManager.notify(R.string.uploader_upload_in_progress_ticker, mNotificationBuilder.build());
    [javac]                                                                                                          ^
    [javac]   symbol:   method build()
    [javac]   location: variable mNotificationBuilder of type Builder
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileUploader.java:769: error: cannot find symbol
    [javac]             .setProgress(0, 0, false);
    [javac]             ^
    [javac]   symbol:   method setProgress(int,int,boolean)
    [javac]   location: class Builder
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\files\services\FileUploader.java:829: error: cannot find symbol
    [javac]             mNotificationManager.notify(tickerId, mNotificationBuilder.build());
    [javac]                                                                       ^
    [javac]   symbol:   method build()
    [javac]   location: variable mNotificationBuilder of type Builder
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\notifications\NotificationBuilderWithProgressBar.java:75: error: method does not over
ride or implement a method from a supertype
    [javac]     @Override
    [javac]     ^
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\notifications\NotificationBuilderWithProgressBar.java:121: error: method does not ove
rride or implement a method from a supertype
    [javac]     @Override
    [javac]     ^
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\notifications\NotificationBuilderWithProgressBar.java:123: error: cannot find symbol
    [javac]         Notification result = super.build();
    [javac]                                    ^
    [javac]   symbol: method build()
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\syncadapter\FileSyncAdapter.java:506: error: cannot find symbol
    [javac]             .notify(id, builder.build());
    [javac]                                ^
    [javac]   symbol:   method build()
    [javac]   location: variable builder of type Builder
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\activity\FileDisplayActivity.java:1876: error: method does not override or impleme
nt a method from a supertype
    [javac]     @Override
    [javac]     ^
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:102: error: cannot find symbol
    [javac]         mRefreshLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_refresh_files);
    [javac]                           ^
    [javac]   symbol:   class SwipeRefreshLayout
    [javac]   location: class ExtendedListFragment
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:103: error: cannot find symbol
    [javac]         mRefreshEmptyLayout = (SwipeRefreshLayout) v.findViewById(R.id.swipe_refresh_files_emptyView);
    [javac]                                ^
    [javac]   symbol:   class SwipeRefreshLayout
    [javac]   location: class ExtendedListFragment
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:238: error: method does not override or impleme
nt a method from a supertype
    [javac]     @Override
    [javac]     ^
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\ExtendedListFragment.java:245: error: method onRefresh in interface OnEnf
orceableRefreshListener cannot be applied to given types;
    [javac]             mOnRefreshListener.onRefresh();
    [javac]                               ^
    [javac]   required: boolean
    [javac]   found: no arguments
    [javac]   reason: actual and formal argument lists differ in length
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\fragment\OCFileListFragment.java:101: error: package SwipeRefreshLayout does not e
xist
    [javac]                     SwipeRefreshLayout.OnRefreshListener.class.getSimpleName());
    [javac]                                       ^
    [javac] C:\Projects\Extern\owncloud\android\src\com\owncloud\android\ui\activity\FolderPickerActivity.java:565: error: method does not override or impleme
nt a method from a supertype
    [javac]     @Override
    [javac]     ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] 30 errors
    [javac] 3 warnings

BUILD FAILED
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:720: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:734: Compile failed; see the compiler error output for details.

Total time: 6 seconds

If I try using Maven, mvn package succeeds, however the resulting .apk is broken - it does not contain any class files, and attempting to start it on the Android device results in:

java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.owncloud.android/com.owncloud.android.ui.activity.FileDisplayActivity}: java.lang.ClassNotFoundException: Didn't find class "com.owncloud.android.ui.activity.FileDisplayActivity" on path: DexPathList[[zip file "/mnt/asec/com.owncloud.android-1/pkg.apk"],nativeLibraryDirectories=[/mnt/asec/com.owncloud.android-1/lib, /vendor/lib, /system/lib]]

If I try using Gradle, I get:

WARNING: Dependency commons-logging:commons-logging:1.0.4 is ignored for debug as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages
WARNING: Dependency commons-logging:commons-logging:1.0.4 is ignored for release as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages
WARNING: Dependency commons-logging:commons-logging:1.0.4 is ignored for debugTest as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
   > Could not find com.android.support:support-v4:19.1.0.
     Searched in the following locations:
         https://repo1.maven.org/maven2/com/android/support/support-v4/19.1.0/support-v4-19.1.0.pom
         https://repo1.maven.org/maven2/com/android/support/support-v4/19.1.0/support-v4-19.1.0.jar
         file:/C:/Projects/Extern/owncloud/android/libs/support-v4-19.1.0.jar
         file:/C:/Projects/Extern/owncloud/android/libs/support-v4.jar
     Required by:
         :android:unspecified

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

BUILD FAILED

Total time: 6.176 secs

I did not try using the IDEs, as I understand these are just GUIs on top of some of the above tools.

This is on Windows 7 x64, using Java JDK 1.8.0-25 x64.

This is for the develop branch. I've also tried the master branch, however that one is even more so broken. pom.xml references an outdated google.android-version, and is missing a dependeny for disklrucache.

tobiasKaminsky commented 9 years ago

Please try it again with Java 7. I doubt that Android is working with Java 8 already.

CyberShadow commented 9 years ago

The Oracle website seems down at the moment, but same results with JDK 1.6.0-35.

I finally managed to build an APK using a Linux virtual machine. adb install doesn't work in the VM though, so this isn't much of a development environment.

tobiasKaminsky commented 9 years ago

Maybe this is related to #800. But there is also no solution so far :/

jab416171 commented 9 years ago

@CyberShadow This issue is now 6 months old... Are you still unable to build?

CyberShadow commented 9 years ago

Gradle still fails:

C:\Projects\Extern\owncloud\android> gradlew clean build
Downloading https://services.gradle.org/distributions/gradle-2.2.1-all.zip
..................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Unzipping C:\Users\Vladimir\.gradle\wrapper\dists\gradle-2.2.1-all\6dibv5rcnnqlfbq9klf8imrndn\gradle-2.2.1-all.zip to C:\Users\Vladimir\.gradle\wrapper\dists\gradle-2.2.1-all\6dibv5rcnnqlfbq9klf8imrndn
Download https://repo1.maven.org/maven2/com/android/tools/build/gradle/1.0.0/gradle-1.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/build/builder/1.0.0/builder-1.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/lint/lint/24.0.0/lint-24.0.0.pom
Download https://repo1.maven.org/maven2/net/sf/proguard/proguard-gradle/5.1/proguard-gradle-5.1.pom
Download https://repo1.maven.org/maven2/net/sf/proguard/proguard-parent/5.1/proguard-parent-5.1.pom
Download https://repo1.maven.org/maven2/com/android/tools/sdk-common/24.0.0/sdk-common-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/common/24.0.0/common-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/build/builder-test-api/1.0.0/builder-test-api-1.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/ddms/ddmlib/24.0.0/ddmlib-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/build/manifest-merger/24.0.0/manifest-merger-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/build/builder-model/1.0.0/builder-model-1.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/sdklib/24.0.0/sdklib-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/lint/lint-checks/24.0.0/lint-checks-24.0.0.pom
Download https://repo1.maven.org/maven2/net/sf/proguard/proguard-base/5.1/proguard-base-5.1.pom
Download https://repo1.maven.org/maven2/com/android/tools/layoutlib/layoutlib-api/24.0.0/layoutlib-api-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/dvlib/24.0.0/dvlib-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/lint/lint-api/24.0.0/lint-api-24.0.0.pom
Download https://repo1.maven.org/maven2/com/android/tools/build/gradle/1.0.0/gradle-1.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/build/builder/1.0.0/builder-1.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/lint/lint/24.0.0/lint-24.0.0.jar
Download https://repo1.maven.org/maven2/net/sf/proguard/proguard-gradle/5.1/proguard-gradle-5.1.jar
Download https://repo1.maven.org/maven2/com/android/tools/sdk-common/24.0.0/sdk-common-24.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/common/24.0.0/common-24.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/build/builder-test-api/1.0.0/builder-test-api-1.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/ddms/ddmlib/24.0.0/ddmlib-24.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/build/manifest-merger/24.0.0/manifest-merger-24.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/build/builder-model/1.0.0/builder-model-1.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/sdklib/24.0.0/sdklib-24.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/lint/lint-checks/24.0.0/lint-checks-24.0.0.jar
Download https://repo1.maven.org/maven2/net/sf/proguard/proguard-base/5.1/proguard-base-5.1.jar
Download https://repo1.maven.org/maven2/com/android/tools/layoutlib/layoutlib-api/24.0.0/layoutlib-api-24.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/dvlib/24.0.0/dvlib-24.0.0.jar
Download https://repo1.maven.org/maven2/com/android/tools/lint/lint-api/24.0.0/lint-api-24.0.0.jar
WARNING: Dependency commons-logging:commons-logging:1.0.4 is ignored for debug as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages
WARNING: Dependency commons-logging:commons-logging:1.0.4 is ignored for release as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages
WARNING: Dependency commons-logging:commons-logging:1.0.4 is ignored for debugTest as it may be conflicting with the internal version provided by Android.
         In case of problem, please repackage it with jarjar to change the class packages

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
   > Could not find com.android.support:support-v4:19.1.0.
     Searched in the following locations:
         https://repo1.maven.org/maven2/com/android/support/support-v4/19.1.0/support-v4-19.1.0.pom
         https://repo1.maven.org/maven2/com/android/support/support-v4/19.1.0/support-v4-19.1.0.jar
         file:/C:/Projects/Extern/owncloud/android/libs/support-v4-19.1.0.jar
         file:/C:/Projects/Extern/owncloud/android/libs/support-v4.jar
     Required by:
         :android:unspecified
   > Could not find com.android.support:appcompat-v7:19.1.0.
     Searched in the following locations:
         https://repo1.maven.org/maven2/com/android/support/appcompat-v7/19.1.0/appcompat-v7-19.1.0.pom
         https://repo1.maven.org/maven2/com/android/support/appcompat-v7/19.1.0/appcompat-v7-19.1.0.jar
         file:/C:/Projects/Extern/owncloud/android/libs/appcompat-v7-19.1.0.jar
         file:/C:/Projects/Extern/owncloud/android/libs/appcompat-v7.jar
     Required by:
         :android:unspecified

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

BUILD FAILED

Total time: 55.562 secs

Apache Ant still fails:

C:\Projects\Extern\owncloud\android> ant clean debug

(... omitted ...)

-post-package:

-do-debug:
     [echo] Library project: do not create apk...
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\owncloud-android-library\bin\build.prop
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\owncloud-android-library\bin\build.prop
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\owncloud-android-library\bin\build.prop
[propertyfile] Updating property file: C:\Projects\Extern\owncloud\android\owncloud-android-library\bin\build.prop

-post-build:

debug:

-code-gen:
[mergemanifest] Found Deleted Target File
[mergemanifest] Merging AndroidManifest files into one.
[mergemanifest] Manifest merger disabled. Using project manifest only.
     [echo] Handling aidl files...
     [aidl] No AIDL files to compile.
     [echo] ----------
     [echo] Handling RenderScript files...
     [echo] ----------
     [echo] Handling Resources...
     [aapt] Found Deleted Target File
     [aapt] Generating resource IDs...
     [aapt] invalid resource directory name: C:\Projects\Extern\owncloud\android\res/values-tzl

BUILD FAILED
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:653: The following error occurred while executing this line:
C:\Program Files (x86)\Android\android-sdk\tools\ant\build.xml:698: null returned: 1

Total time: 6 seconds

Maven still fails:

C:\Projects\Extern\owncloud\android> mvn package
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com.owncloud.android:owncloud:apk:1.5.1-SNAPSHOT
[WARNING] 'version' contains an expression but should be a constant. @ com.owncloud.android:owncloud:${owncloud.version}, C:\Projects\Extern\owncloud\android\pom.xml, line 9, column 14
[WARNING] 'dependencies.dependency.systemPath' for touch-image-view.jar:touch-image-view.jar:jar should not point at files within the project directory, ${basedir}/libs/touch-image-view.jar will be unresolvable by dependent projects @ com.owncloud.android:owncloud:${owncloud.version}, C:\Projects\Extern\owncloud\android\pom.xml, line 47, column 25
[WARNING] 'dependencies.dependency.systemPath' for android-support-v4.jar:android-support-v4.jar:jar should not point at files within the project directory, ${basedir}/third_party/android-support-library/android-support-v4.jar will be unresolvable by dependent projects @ com.owncloud.android:owncloud:${owncloud.version}, C:\Projects\Extern\owncloud\android\pom.xml, line 69, column 25
[WARNING] 'dependencies.dependency.systemPath' for android-support-v4.jar:android-support-v4.jar:jar refers to a non-existing file C:\Projects\Extern\owncloud\android\third_party\android-support-library\android-support-v4.jar @ com.owncloud.android:owncloud:${owncloud.version}, C:\Projects\Extern\owncloud\android\pom.xml, line 69, column 25
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Owncloud Android 1.5.1-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The artifact com.actionbarsherlock:library:apklib:4.2.0 has been relocated to com.actionbarsherlock:actionbarsherlock:apklib:4.2.0
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.716 s
[INFO] Finished at: 2015-06-29T20:38:50+00:00
[INFO] Final Memory: 23M/981M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project owncloud: Could not resolve dependencies for project com.owncloud.android:owncloud:apk:1.5.1-SNAPSHOT: Could not find artifact android-support-v4.jar:android-support-v4.jar:jar:1.0 at specified path C:\Projects\Extern\owncloud\android\third_party\android-support-library\android-support-v4.jar -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

So, yes, I'm still unable the build the develop branch, with either Gradle, Maven, or Ant.

davivel commented 9 years ago

@CyberShadow , did you run the setup_env.bat script?

CyberShadow commented 9 years ago

Yes, of course. I ran it as described in SETUP.md.

davivel commented 9 years ago

But you are trying with the three command line environement; are you running setup_env.bat with the proper argument each time you "switch"?

Maven build is broken, anyway.

CyberShadow commented 9 years ago

But you are trying with the three command line environement; are you running setup_env.bat with the proper argument each time you "switch"?

Yep.

davivel commented 9 years ago

It's working fine for me from a fresh cloned project..

Do you have the Android SDK installed and the %ANDROID_HOME% environment variable pointing to it? Seems in your logs that Gradle is downloading the SDK from the Maven repository, we didn't check an environment without preinstalling it.

CyberShadow commented 9 years ago

It's working fine for me from a fresh cloned project..

I don't doubt that it works for someone :) Not me unfortunately.

Do you have the Android SDK installed and the %ANDROID_HOME% environment variable pointing to it?

Yep.

C:\Projects\Extern\owncloud\android> set | grep ANDROID
ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk
ANDROID_NDK=C:\Soft\android-ndk-r10b

Maybe I'm missing some Android SDK component? I did install the ones in the build instructions.

davivel commented 9 years ago

Mmm, it's not in the instructions, but I can see in my environment Android Support Repository, in the Extras folder.

Give it a try and tell us.

Sorry, I can't check anymore today.

CyberShadow commented 9 years ago

After installing Android Support Repository and updating develop, the Gradle build now works. Thanks!

Not sure which of those two fixed it. I could look into it if there's interest. Ant build still fails.

davivel commented 9 years ago

It's the Android Support Repository , we'll add it to the instructions in SETUP.md.

About ant, from your last log, my bet is on the verion of the Android SDK Tools or/and Android SDK Build-tools components. Check in your Android SDK Manager that you are using the last one. Google sneaked a bug in a previous version of those that totally broke ant builds (at least ours).

CyberShadow commented 9 years ago

I installed all versions of Android SDK Build-Tools, which fixed the ant build.

I had versions 19.0.0 and 20.0.0 installed, so the remaining ones I installed today were 19.1.0, 21.1.2 and 22.0.1. SETUP.md said that "any version from 20 or later should work fine".

davivel commented 9 years ago

Yes, we'll have to update that also.

tobiasKaminsky commented 8 years ago

@davivel which version is required? Then setup.md should be updated according to that.