diff --git a/java/app_test.go b/java/app_test.go index 6429ab836..6efb0dcb3 100644 --- a/java/app_test.go +++ b/java/app_test.go @@ -291,7 +291,7 @@ func TestAndroidAppLinkType(t *testing.T) { } `) - testJavaError(t, "Adjust sdk_version: property of the source or target module so that target module is built with the same or smaller API set than the source.", ` + testJavaError(t, "consider adjusting sdk_version: OR platform_apis:", ` android_app { name: "foo", srcs: ["a.java"], @@ -335,7 +335,7 @@ func TestAndroidAppLinkType(t *testing.T) { } `) - testJavaError(t, "Adjust sdk_version: property of the source or target module so that target module is built with the same or smaller API set than the source.", ` + testJavaError(t, "consider adjusting sdk_version: OR platform_apis:", ` android_app { name: "foo", srcs: ["a.java"], diff --git a/java/java.go b/java/java.go index d04968510..4c3363a9c 100644 --- a/java/java.go +++ b/java/java.go @@ -962,7 +962,9 @@ func checkLinkType(ctx android.ModuleContext, from *Module, to linkTypeContext, return } otherLinkType, _ := to.getLinkType(ctx.OtherModuleName(to)) - commonMessage := "Adjust sdk_version: property of the source or target module so that target module is built with the same or smaller API set than the source." + commonMessage := " In order to fix this, consider adjusting sdk_version: OR platform_apis: " + + "property of the source or target module so that target module is built with the same " + + "or smaller API set when compared to the source." switch myLinkType { case javaCore: diff --git a/java/java_test.go b/java/java_test.go index 7f5198211..2dcf129cf 100644 --- a/java/java_test.go +++ b/java/java_test.go @@ -200,7 +200,7 @@ func TestJavaLinkType(t *testing.T) { } `) - testJavaError(t, "Adjust sdk_version: property of the source or target module so that target module is built with the same or smaller API set than the source.", ` + testJavaError(t, "consider adjusting sdk_version: OR platform_apis:", ` java_library { name: "foo", srcs: ["a.java"], @@ -244,7 +244,7 @@ func TestJavaLinkType(t *testing.T) { } `) - testJavaError(t, "Adjust sdk_version: property of the source or target module so that target module is built with the same or smaller API set than the source.", ` + testJavaError(t, "consider adjusting sdk_version: OR platform_apis:", ` java_library { name: "foo", srcs: ["a.java"],