android-sliding-layer-lib icon indicating copy to clipboard operation
android-sliding-layer-lib copied to clipboard

How to install your library on intelliJ

Open messaoudia opened this issue 12 years ago • 13 comments

Hello THANKS for this library but ;p I try this with intelliJ idea

File > import Module and choose your library but in java I dont found the class SlidingLayer. ( I am french my english is not good but i can understand) How to fix it ?

messaoudia avatar Jun 17 '13 15:06 messaoudia

Shame on me, never tried IntelliJ before. I think @chrisjenx is using it. Any idea?

JlUgia avatar Jun 17 '13 15:06 JlUgia

You will need to use Maven until I Gradlise it. If you double click the .pom file in the root of the project that will import most of the settings.

The only issue you will have is that @6wunderkinder use a private mirror which has a version of the support library which is not public. You will need to drop this back to the public google one.

Which is this (inside the library pom.xml file):

<dependency>
    <groupId>com.google.android</groupId>
    <artifactId>support-v4</artifactId>
    <version>r7</version>
</dependency>

I have never done an android project without using maven so I'm not sure how you include library projects manually...

chrisjenx avatar Jun 17 '13 15:06 chrisjenx

Suffice to say I can look at adding Gradle Support this weekend which will be really helpful for alot of people? If that would help?

chrisjenx avatar Jun 17 '13 15:06 chrisjenx

Thanks for the responses And for eclipse it works ?? And how to do it in eclipse I am new in Android developement i was on iOS developement ? You can try to add GraddleSupport if you have time

messaoudia avatar Jun 17 '13 15:06 messaoudia

I will try to double clik in the .pom

messaoudia avatar Jun 17 '13 15:06 messaoudia

@chrisjenx Gradle support would rock -- I'm trying to move stuff over to Gradle, but until the libraries I use support it, I'm kinda stuck

ankushg avatar Jun 17 '13 18:06 ankushg

Sure OK, looks like my weekend sorted then! I was waiting on ActionBarSherlock, before I moved, but now seems as good as time as any for this project. Lead by example and all that!

On 17 June 2013 19:12, Ankush Gupta [email protected] wrote:

@chrisjenx https://github.com/chrisjenx Gradle support would rock -- I'm trying to move stuff over to Gradle, but until the libraries I use support it, I'm kinda stuck

— Reply to this email directly or view it on GitHubhttps://github.com/6wunderkinder/android-sliding-layer-lib/issues/21#issuecomment-19563452 .

chrisjenx avatar Jun 17 '13 18:06 chrisjenx

Hey @chrisjenx, any progress on this?

ankushg avatar Jun 27 '13 23:06 ankushg

@Ankush unfortunately not, we're just about to launch so super busy over here :)

On 28 June 2013 00:40, Ankush Gupta [email protected] wrote:

Hey @chrisjenx https://github.com/chrisjenx, any progress on this?

— Reply to this email directly or view it on GitHubhttps://github.com/6wunderkinder/android-sliding-layer-lib/issues/21#issuecomment-20162384 .

chrisjenx avatar Jun 27 '13 23:06 chrisjenx

@chrisjenx darn, good luck with the launch though!

Anyone have an idea how to use SlidingLayerLib with gradle/Android Studio? I have it imported, but I'm getting error: package R does not exist in SlidingLayer.java... Here's my build.gradle in the Library folder:

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

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

android {
    compileSdkVersion 17
    buildToolsVersion "17.0.0"

    sourceSets {
        main {
            manifest.srcFile 'AndroidManifest.xml'
            java.srcDirs = ['src']
            resources.srcDirs = ['src']
            aidl.srcDirs = ['src']
            renderscript.srcDirs = ['src']
            res.srcDirs = ['res']
            assets.srcDirs = ['assets']
        }
    }
}

I think the problem might be with the difference between the old gen folder and the new build folder and for some reason it's not able to see the new R.java? Anyone have any tips?

ankushg avatar Jun 28 '13 20:06 ankushg

Check out the imports of R, still not sure about Android Studio but keep in mind that they point to the library's package name. You'll need to change that to the sample app (or your apps) 's package name.

JlUgia avatar Jun 28 '13 21:06 JlUgia

Wait why would I need to change them in the SlidingLayer.java file to point to my package name? Is that how the new build folder works?

ankushg avatar Jun 28 '13 21:06 ankushg

@chrisjenx @JlUgia https://github.com/6wunderkinder/android-sliding-layer-lib/pull/26

ankushg avatar Jun 30 '13 01:06 ankushg