leonfancy / oggus

Oggus is a Java library for reading and writing Ogg and Opus stream. Opus packet structure is supported.
Do What The F*ck You Want To Public License
28 stars 0 forks source link

Not compatible with Java 8 #1

Closed zkz19872009 closed 3 years ago

zkz19872009 commented 3 years ago

Compile failed files-2.1/org.chenliang.oggus/oggus/1.0.0/2223b9ddae6120fa4d4c0076a573d0428033bf68/oggus-1.0.0.jar' using Jetifier. Reason: null. (Run with --stacktrace for more details.)

leonfancy commented 3 years ago

Please give more detail about how you use it.

zkz19872009 commented 3 years ago

Has been introduced into my app implementation 'org.chenliang.oggus:oggus:1.0.0' and compile failed。

zkz19872009 commented 3 years ago

in my gradle properties set android.jetifier.blacklist = oggus-1.0.0.jar and compile fail .gradle/caches/modules-2/files-2.1/org.chenliang.oggus/oggus/1.0.0/2223b9ddae6120fa4d4c0076a573d0428033bf68/oggus-1.0.0.jar(org/chenliang/oggus/opus/AudioDataPacket.class) 类文件具有错误的版本 55.0, 应为 52.0 请删除该文件或确保该文件位于正确的类路径子目录中。

leonfancy commented 3 years ago

OK, this is because oggus are compiled target to Java 11, however you are using Java 8. I can publish a Java 8 compatible version.

zkz19872009 commented 3 years ago

To ask a question, the remote control grab opus does not take the lead file, the player can not play the opus format, do you know how to join the header file

leonfancy commented 3 years ago

Fixed in release 1.1.0.

zkz19872009 commented 3 years ago

sir, ERROR: Failed to resolve: org.chenliang.oggus:oggus:1.1.0 Show in Project Structure dialog Affected Modules: app

leonfancy commented 3 years ago

Sorry, I forgot to publish it to maven repository. It would be fixed, please try again.

zkz19872009 commented 3 years ago

sir, i use this: OggOpusStream oggOpusStream = null; try { oggOpusStream = OggOpusStream.from("audio/test03.opus"); } catch (IOException e) { e.printStackTrace(); } IdHeader idHeader = oggOpusStream.getIdHeader(); crash: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'org.chenliang.oggus.opus.IdHeader org.chenliang.oggus.opus.OggOpusStream.getIdHeader()' on a null object reference at com.example.testopus.MainActivity.initOpus(MainActivity.java:36) at com.example.testopus.MainActivity.onCreate(MainActivity.java:26)

leonfancy commented 3 years ago

This is the problem with your own code.