Skip to content Skip to sidebar Skip to footer

Use Custom Android.bluetooth. Instead Of One Present In Default Sdk Android.jar In Android Studio

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 imported into

Solution 1:

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.
        }
    }
}

Post a Comment for "Use Custom Android.bluetooth. Instead Of One Present In Default Sdk Android.jar In Android Studio"