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

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