sagus_helgy
sagus_helgy

Reputation: 1437

Android Gradle package org.holoeverywhere.app does not exist

I have 3-days(and night) problem while compiling my test project via gradle

My error is

error: package org.holoeverywhere.app does not exist
import org.holoeverywhere.app.Activity;

I have the following structure:

MySimpleProject
-SimpleApp
--build.gradle
-settings.gradle
-build.gradle

My SimpleApp depends HoloEverywhere library.

build.gradle from MySimpleProject is

buildscript {
    repositories {
        mavenCentral()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:0.4'
    }
}

setting.gradle from MySimpleProject is

include ':SimpleApp'

build.gradle from SimpleApp

apply plugin: 'android'

repositories {
    mavenCentral()
    mavenLocal()
}
dependencies {
    compile 'org.holoeverywhere:library:1.6.1'
}

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"
}

Log

./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;

Can anybody help me?

Upvotes: 0

Views: 1787

Answers (4)

Sathish
Sathish

Reputation: 1475

Inspired by this answer, these are the steps I did:

Put the jar file (in my case, 'something.jar') into the libs folder of your project Right click it and select Add as library Type this in the dependencies part of build.gradle file: compile files('libs/something.jar') Do a clean build. It can be done inside the android studio, but I also ran the gradlew.bat included inside the project folder Now, the project should be built and run just fine.

Upvotes: 0

Aldo Borrero
Aldo Borrero

Reputation: 547

This repo contains the generated aar format, simply add:

repositories {
    maven {
        url 'https://github.com/Goddchen/mvn-repo/raw/master/'
    }
    mavenCentral()
}

To your gradle repositories and add:

dependencies {
  compile "org.holoeverywhere:holoeverywhere:1.6.8"
}

Upvotes: 3

Mazen K
Mazen K

Reputation: 3662

Android Studio: at the build.gradle dependencies copy and paste this:

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
}

Upvotes: 1

Xavier Ducrohet
Xavier Ducrohet

Reputation: 28539

This library is only published as an apklib which the gradle plugin does not support.

Upvotes: 1

Related Questions