Reputation: 45
I am trying to create xamarin wrapper for Plugin SDK built in Native Android (built using kotlin language). I am getting below log.
obj/Debug/api.xml.class-parse : warning BG8605: The Java type '$' could not be found (are you missing a Java reference jar/aar or a Java binding library NuGet?)
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Bindings.ClassParse.targets(36,5): obj/Debug/api.xml.class-parse warning BG8605: The Java type '$' could not be found (are you missing a Java reference jar/aar or a Java binding library NuGet?)
obj/Debug/api.xml.class-parse : warning BG8605: The Java type 'kotlin.jvm.internal.FunctionReferenceImpl' could not be found (are you missing a Java reference jar/aar or a Java binding library NuGet?)
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Bindings.ClassParse.targets(36,5): obj/Debug/api.xml.class-parse warning BG8605: The Java type 'kotlin.jvm.internal.FunctionReferenceImpl' could not be found (are you missing a Java reference jar/aar or a Java binding library NuGet?)
The method '[Method] com.*.blesdk.manager.BluetoothLeService access$getMBluetoothLeService$p(com.*.blesdk.manager.BLEConnectionManager $this)' was removed because its name contains a dollar sign.
The method '[Method] java.lang.String access$getMDeviceAddress$p(com.*.blesdk.manager.BLEConnectionManager $this)' was removed because its name contains a dollar sign.
The method '[Method] com.*.blesdk.manager.BLEConnectionManager.BLEConnectionListener access$getUser$p(com.*.blesdk.manager.BLEConnectionManager $this)' was removed because its name contains a dollar sign.
The method '[Method] void access$setMBluetoothLeService$p(com.*.blesdk.manager.BLEConnectionManager $this, com.*.blesdk.manager.BluetoothLeService <set-?>)' was removed because its name contains a dollar sign.
The method '[Method] boolean connectDevice$default(com.*.blesdk.manager.BLEConnectionManager p0, java.lang.String p1, int p2, java.lang.Object p3)' was removed because its name contains a dollar sign.
The class '[Class] com.*.blesdk.manager.BLEConnectionManager.Companion.1' was removed because the Java base type 'kotlin.jvm.internal.FunctionReferenceImpl' could not be found.
The class '[Class] com.*.blesdk.manager.BLEScanManager.Companion.1' was removed because the Java base type 'kotlin.jvm.internal.FunctionReferenceImpl' could not be found.
The method '[Method] void access$broadcastUpdate(com.*.blesdk.manager.BluetoothLeService $this, java.lang.String action)' was removed because its name contains a dollar sign.
The method '[Method] void access$broadcastUpdate(com.*.blesdk.manager.BluetoothLeService $this, java.lang.String action, android.bluetooth.BluetoothGattCharacteristic characteristic)' was removed because its name contains a dollar sign.
The method '[Method] android.bluetooth.BluetoothGatt access$getMBluetoothGatt$p(com.*.blesdk.manager.BluetoothLeService $this)' was removed because its name contains a dollar sign.
The method '[Method] java.lang.String access$getTAG$cp()' was removed because its name contains a dollar sign.
The method '[Method] java.util.UUID access$getUUID_HEART_RATE_MEASUREMENT$cp()' was removed because its name contains a dollar sign.
The method '[Method] void access$setMConnectionState$p(com.*.blesdk.manager.BluetoothLeService $this, int <set-?>)' was removed because its name contains a dollar sign.
The method '[Method] void logd$default(com.*.blesdk.utility.Loggers p0, java.lang.String p1, java.lang.Throwable p2, int p3, java.lang.Object p4)' was removed because its name contains a dollar sign.
The method '[Method] void loge$default(com.*.blesdk.utility.Loggers p0, java.lang.String p1, java.lang.Throwable p2, int p3, java.lang.Object p4)' was removed because its name contains a dollar sign.
The method '[Method] void logi$default(com.*.blesdk.utility.Loggers p0, java.lang.String p1, java.lang.Throwable p2, int p3, java.lang.Object p4)' was removed because its name contains a dollar sign.
The method '[Method] void logv$default(com.*.blesdk.utility.Loggers p0, java.lang.String p1, java.lang.Throwable p2, int p3, java.lang.Object p4)' was removed because its name contains a dollar sign.
The method '[Method] void logw$default(com.*.blesdk.utility.Loggers p0, java.lang.String p1, java.lang.Throwable p2, int p3, java.lang.Object p4)' was removed because its name contains a dollar sign.
obj/Debug/java-resolution-report.log : warning BG8606: Some types or members could not be bound because referenced Java types could not be found. See the 'java-resolution-report.log' file for details.
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Bindings.ClassParse.targets(36,5): obj/Debug/java-resolution-report.log warning BG8606: Some types or members could not be bound because referenced Java types could not be found. See the 'java-resolution-report.log' file for details.
Upvotes: 0
Views: 461
Reputation: 1602
Errors you encounter during the initial phase of Java type resolution are emitted as warnings. These are missing external Java types and generally indicate the user is missing a reference .jar
or binding NuGet.
The class '[Class] com.*.blesdk.manager.BLEConnectionManager.Companion.1' was removed because the Java base type 'kotlin.jvm.internal.FunctionReferenceImpl' could not be found.
The class '[Class] com.*.blesdk.manager.BLEScanManager.Companion.1' was removed because the Java base type 'kotlin.jvm.internal.FunctionReferenceImpl' could not be found.
remaining resolution errors are generally the fallout from those missing external types. For example: 'androidx.appcompat.widget.AppCompatTextView'
, if the above missing type caused us to remove com.example.MyTextView
, then that may result in us removing class GetMyTextView()
due to a missing return type.
it is recommended to carefully check java-resolution-report.log
, that display a warning notifying the user that some types could not be bound.
because i noticed that this problem has different variants and causes you could change the accessibility of the class given the following Kotlin code:
internal Class {
public interface { }
}
// The default Java representation
public Class {
public interface { }
}
// In order to prevent this being bound, our Kotlin fixups instead change it to
private Class {
private interface { }
}
this might help you eliminate or reduce the warnings, since you have to navigate between classes and methods in the log file.
Also check:
Upvotes: 0