Importing org.apache.commons into android applications

前端 未结 4 1073
情歌与酒
情歌与酒 2020-12-31 07:07

Hay, how do i import org.apache.commons packages into android so i can use them in my applications?

Thanks

4条回答
  •  猫巷女王i
    2020-12-31 07:24

    If you are using android Stuido - that doesn't yet supports adding libraries - you need to edit the src/build.gradle

    I wanted to add org.apache.commons.net and My file called 'org.apache.commons.net.jar' was placed in the libs folder, so my build.gradles dependencies look now like this:

    dependencies {
        compile files('libs/android-support-v4.jar')
        compile files('libs/org.apache.commons.net.jar')
    }
    

提交回复
热议问题