问题
I try to solve this problem for hours now and didn't find a solution on the internet. my project looks like this:

de.MayerhoferSimon.Vertretungsplan
package. (yes, I know packages should be lowercase.)
Is this possible and when yes, how?
I tried some things with the dependencies in the .gradle file of the :app
module but nothing worked.
回答1:
In this case you should create a library module for your webuntisaccessor code instead of putting this in the libs folder.
root
settings.gradle
app
build.gradle
webuntisaccessor
src
main
java
build.gradle
In settings.gradle
:
include ':webuntisaccessor' , ':app'
In webuntisaccessor/build.gradle
apply plugin: 'com.android.library'
In app/build.gradle
add:
dependencies {
compile project(':webuntisaccessor')
}
来源:https://stackoverflow.com/questions/28681353/how-to-access-java-files-from-a-directory-outside-of-a-package-in-android-studi