-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ClassNotFound exception when calling nested static class with correct argument #1195
Comments
Here is what I did as a workaround for the problem (in case if someone faces it too) ; |
Environment
Provide version numbers for the following components (information can be retrieved by running
tns info
in your project folder or by inspecting thepackage.json
of the project):Describe the bug
java.lang.ClassNotFoundException: com.tns.gen.com.google.android.exoplayer2.source.smoothstreaming.DefaultSsChunkSource$Factory
When connected with chrome debugger, everything is fine, if you put a breakpoint you will see that the class is there, also from console when you try to instantiate the class with wrong argument, you will see "Invalid number of arguments" message. But when you pass the correct argument, java.lang.ClassNotFoundException exception is fired.
My gradle config (sdk versions) :
compileSdkVersion = 26 defaultConfig { minSdkVersion = 24 targetSdkVersion = 24 }
To Reproduce
add dependency to exoplayer into gradle, and try to create object from the nested static class.
dependencies {
compile 'com.google.android.exoplayer:exoplayer:2.6.1'
}
new com.google.android.exoplayer2.source.smoothstreaming.DefaultSsChunkSource.Factory({})
Expected behavior
When passing the correct object as an argument, there shall be no java.lang.ClassNotFoundException
Sample project
Additional context
Here is the class from exoplayer library :
public class DefaultSsChunkSource implements SsChunkSource { public static final class Factory implements SsChunkSource.Factory {
also here is the interface details :
public interface SsChunkSource extends ChunkSource { interface Factory {
The text was updated successfully, but these errors were encountered: