Extension Build Failed

Hello to all
I was trying to build a extension using extension template and it build successfully but in companion it thrown a java.lang.NoClassDefFoundError so I used uses libraries annoation but after using that my code thrown a different error which is

 [java] WARNING in ru.blizzed.pixabaylib.PixabayCaller$Listener.onComplete:(Ljava/lang/Object;Lru/blizzed/pixabaylib/PixabayCaller;)V: defining a default interface method requires --min-sdk-version
>= 24 (currently 13) for interface methods: ru.blizzed.pixabaylib.PixabayCaller$Listener.onComplete:(Ljava/lang/Object;Lru/blizzed/pixabaylib/PixabayCaller;)V
 [java] WARNING in ru.blizzed.pixabaylib.PixabayCaller$Listener.onError:(Lru/blizzed/pixabaylib/model/PixabayError;Lru/blizzed/pixabaylib/PixabayCaller;)V: defining a default interface method requir
es --min-sdk-version >= 24 (currently 13) for interface methods: ru.blizzed.pixabaylib.PixabayCaller$Listener.onError:(Lru/blizzed/pixabaylib/model/PixabayError;Lru/blizzed/pixabaylib/PixabayCaller;)V
 [java] WARNING in ru.blizzed.pixabaylib.PixabayCaller$Listener.onFailure:(Lru/blizzed/pixabaylib/PixabayCallException;Lru/blizzed/pixabaylib/PixabayCaller;)V: defining a default interface method re
quires --min-sdk-version >= 24 (currently 13) for interface methods: ru.blizzed.pixabaylib.PixabayCaller$Listener.onFailure:(Lru/blizzed/pixabaylib/PixabayCallException;Lru/blizzed/pixabaylib/PixabayCal
ler;)V
 [java] Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in ru.blizzed.pixabaylib.Launcher.main:([Ljava/lang/String;)V: invalid opcode ba - invokedynamic requires --min-sdk-ver
sion >= 26 (currently 13)
 [java] Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in ru.blizzed.pixabaylib.Pixabay.initRetrofit:()V: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (
currently 13)
 [java] Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in ru.blizzed.pixabaylib.model.PixabayVideo$Videos$Deserializer.deserialize:(Lcom/google/gson/JsonElement;Ljava/lang/re
flect/Type;Lcom/google/gson/JsonDeserializationContext;)Lru/blizzed/pixabaylib/model/PixabayVideo$Videos;: invalid opcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)
 [java] Uncaught translation error: com.android.dx.cf.code.SimException: ERROR in ru.blizzed.pixabaylib.params.ParamsConverter.asMap:([Lru/blizzed/pixabaylib/params/Param;)Ljava/util/Map;: invalid o
pcode ba - invokedynamic requires --min-sdk-version >= 26 (currently 13)
 [java] 4 errors; aborting

BUILD FAILED

I don't know why this is happening is there any issue with library I am using?

Please help

@ewpatton sir please help

Maybe the error is not caught, you need to use try-catch for add throws Exception or throws YOUR_EXCEPTION

Read the post carefully

Now I updated my extension template to the latest version after doing that it solved that error but it thrown another error

dexExtension:
[java]
[java] PARSE ERROR:
[java] InvokeDynamic not supported
[java] ...while preparsing cst 000f at offset 0000004a
[java] ...while parsing ru/blizzed/pixabaylib/Launcher.class
[java] 1 error; aborting

BUILD FAILED
D:\NewTemplete\my-extension\build.xml:113: The following error occurred while executing this line:
D:\NewTemplete\my-extension\build.xml:126: Java returned: 1

There are several topics in community but didn't got solution

If anyone know solution then please help me. @ewpatton sir

Can you show your code?

The version of dx that is used by App Inventor doesn't support newer language features such as Java lambda functions. The library you're using does include those though, so dx is giving an error. You could try updating the version of dx used in the extension system, but I expect that even if you do this apps won't compile until we update the version of dx running on the buildservers.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.