How to use given library in Kodular ide or appybuilder code editor

So i want to use firebase library which is already given in both but its giving me error
I used UsesLibraries(libraries = “firebase.jar”)
What I am doing wrong?

What error do you get?

Try
@UsesLibraries(libraries = "firebase.jar")

See here:

1 Like

In appybuilder code editor it is showing that firebase is a variable and in Kodualr ide it showing error in @UsesLibraries

How did you write that in IDE? If you wrote “UseseLibraries”, then it is normal to give error.

i typed wrong here

1 Like

Can you give error log then? So we can see what is wrong with your code. Otherwise it will be hard to find your error by asking and asking questions.

2 Likes

Starting Code
import android.content.Context;
import android.util.Log;
import com.google.appinventor.components.annotations.;
import com.google.appinventor.components.runtime.
;
import com.google.appinventor.components.common.ComponentCategory;
import com.firebase.*;

@DesignerComponent(version = 1, description = “This Extension was created with the AppyBuilder Code Editor.
” +
“Create your own here:
https://editor.appybuilder.com
”,
category = ComponentCategory.EXTENSION,
nonVisible = true, iconName = “http://appyBuilder.com/extensions/icons/extension.png”)
@SimpleObject(external = true)
@UsesLibraries(libraries = “firebase.jar”)

Error

import com.firebase.*;
[javac] ^
[javac] /projects/goldv2/appinventor-sources/appinventor/components/src/com/appybuilder/krishjha07/Online_Offline/Online_Offline.java:36: error: cannot find symbol
[javac] Firebase fb = new Firebase(“https://123.firebaseio.com”);
[javac] ^
[javac] symbol: class Firebase
[javac] location: class Online_Offline
[javac] /projects/goldv2/appinventor-sources/appinventor/components/src/com/appybuilder/krishjha07/Online_Offline/Online_Offline.java:36: error: cannot find symbol
[javac] Firebase fb = new Firebase(“https://123.firebaseio.com”);
[javac] ^

Try:
import com.firebase.client.*;

3 Likes

what star means?

2 Likes

It will Import all Classes in the package rather than a specific Class.

So basically it’s a wildcard character.

Edit: FYI - Most will argue that this isn’t good practice because it can cause collisions if you aren’t careful.

You havent learn java and trying to build extension , isnt kind a scarry deal​:joy:

1 Like

When I Koded An Extension I Clicked Build And I Waited 5 Minutes And What Now It Gave Me Last Build Log Button Only And Its Red :triumph: :angry: :angry: :angry: