我已經3天(和夜間)的問題,同時通過gradle
Android的搖籃包org.holoeverywhere.app不存在
編譯我的測試項目我的錯誤是
error: package org.holoeverywhere.app does not exist
import org.holoeverywhere.app.Activity;
我有以下結構:
MySimpleProject
-SimpleApp
--build.gradle
-settings.gradle
-build.gradle
我的SimpleApp
取決於HoloEverywhere庫。
build.gradle
從MySimpleProject
是
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.4'
}
}
setting.gradle
從MySimpleProject
是
include ':SimpleApp'
從SimpleApp
build.gradle
apply plugin: 'android'
repositories {
mavenCentral()
mavenLocal()
}
dependencies {
compile 'org.holoeverywhere:library:1.6.1'
}
android {
compileSdkVersion 17
buildToolsVersion "17.0.0"
}
登錄
./gradlew build
The TaskContainer.add() method has been deprecated and is scheduled to be removed in Gradle 2.0. Please use the create() method instead.
:SimpleApp:prepareDebugDependencies
:SimpleApp:compileDebugAidl UP-TO-DATE
:SimpleApp:generateDebugBuildConfig UP-TO-DATE
:SimpleApp:mergeDebugAssets UP-TO-DATE
:SimpleApp:compileDebugRenderscript UP-TO-DATE
:SimpleApp:mergeDebugResources UP-TO-DATE
:SimpleApp:processDebugManifest UP-TO-DATE
:SimpleApp:processDebugResources UP-TO-DATE
:SimpleApp:compileDebug
/home/oleg/AndroidStudioProjects/MySimpleProject/SimpleApp/src/main/java/com/example/mysimpleapp/LoginActivity.java:19: error: package org.holoeverywhere.app does not exist
import org.holoeverywhere.app.Activity;
有人能幫助我嗎?
我發現jar庫 - http://search.maven.org/remotecontent?filepath=org/holoeverywhere/library/1.6.1/library-1.6.1.jar –
這只是代碼。要實際使用庫,您還需要apklib的內容(它包含清單和res文件夾)。然而,這是Gradle插件無法理解的格式。它使用包含jar和res的不同格式(aar)。 Maven插件將在某個時刻遷移到它。 –