Importing packages - Java

Hi everyone and especially ExtensionDevelopers ,
I’m starting to learn java and extension Development currently and i made some simple extensions using appybuilder code editor, i had setup the app Inventor Sources on my computer, but i have a question… It happens with me many times that i start to build extensions and i get error ( cannot find symbol ) as i’m not importing its package name in my code. And when i search for java codes to help me building extension…They don’t provide the required packages that we need to import. So it’s very hard to know the package that i need to import. Is there is a way to make extensions without importing packages or is there is a way to know the required packages i need to import for each class i use. I searched google and the forums but i didn’t find an answer…

Edit: You might want to take a look at the Android documentation along with using an IDE, which you can find the package name, and all of the methods included in the Android built-in classes. You can always search the class name / package name on your search engine.

the community to discuss working with the App Inventor sources is here

Taifun

1 Like

Okay @taifun, i was thinking i can post here as i saw multiple questions related to extension developing in the off topic category here :sweat_smile: I will remove the topic though ( Edit : that wasn’t possible any way )

I did not say you should remove your post…
I only was suggesting to ask the experts… and you will find them there…
feel free to ask anything here in the #off-topic category…
Taifun

3 Likes

Are you using custom libraries. If possible then paste your code here

1 Like

My problem is that I don’t know what is necessary imports for each method in java. Like View view = component.getView(); needs this import import android.view.View; but, is there any idea for these import to do not be added or to be added automatically… Or is there is a place i can know the imports needed for each method…
I realy need that as i see many helpful java codes but it dosn’t contain the imports name :pensive:

I suggest you to use a Java IDE like Intelij IDEA or Eclipse.
Intellij IDEA: Best auto complete feature
Eclipse: Faster compilation

1 Like

Thanks @vknow360 for your help :grinning:… i’m installing intelij IDEA now acording to your suggestion because i really need the auto complete feature…

1 Like

Cons (Note: My Laptop has 4gb ram):

  • Consumes a bit more ram
  • Takes a lot of time on startup

But overall it is better than Android Studio.
images (4)

1 Like

Okay thank you very much @vknow360 :blush: ,I’ll try it…If it was very slow i will try to install eclipse… :+1:

1 Like

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