Use custom android.bluetooth. instead of one present in default sdk android.jar in android studio

后端 未结 1 1428
旧巷少年郎
旧巷少年郎 2021-01-07 02:34

I wanted to use custom android.bluetooth instead of which presend in android.jar which comes with android SDK. I compiled android.bluetooth into seperate jar file and import

1条回答
  •  傲寒
    傲寒 (楼主)
    2021-01-07 02:53

    The bootclasspath parameter must be an absolute path. So, you should modify build.gradle like this:

    def androidJar = file('android.jar') // obtain you jar file
    allprojects {
        gradle.projectsEvaluated {
            tasks.withType(JavaCompile) {
                options.compilerArgs.add("-Xbootclasspath/p:$androidJar") // file.toString() is absolute path.
            }
        }
    }
    

    0 讨论(0)
提交回复
热议问题