Error in creating gradient extension

I do not understand what you say

Instead of creating an extension in the AppyBuilder editor, use the recommended AI2 environment.

What I need to use instead of appybuilder editor

It looks as if the appybuilder did not see this import:
import android.view.View;

http://kio4.com/appinventor/125B_extensiones_crear_i.htm

Simply send me what is error in this and what I use on error place

It should be getView()

Is there only one error

@vknow360 I set it to getView() is there more error

IF we all will do everything to help you, what will you yourself learn,

Recommendations :

  1. Learn Java
  2. Download a good IDE (Preferred : Intellij)
  3. Use Appinventor sources/ Extension Template/ Rush , Appybuilder Editor sources are very much deprecated.
  4. Start Building from basic extensions
  5. Try to solve errors yourself mostly, if you fail to solve, then ask here, (Errors teach you many things)

This is my first extension and I try to solve this but I do not understand what is this 2 error
[javac] /projects/goldv2/appinventor-sources/appinventor/components/src/com/appybuilder/farazfiroz2472/Gradient/Gradient.java:68: error: incompatible types: unexpected return value
[javac] return GradientDrawable.Orientation.TOP_BOTTOM;
[javac] ^

[javac] /projects/goldv2/appinventor-sources/appinventor/components/src/com/appybuilder/farazfiroz2472/Gradient/Gradient.java:73: error: incompatible types: unexpected return value
[javac] return GradientDrawable.Orientation.BOTTOM_TOP;
[javac] ^

Appybuilder Editor can give very weird errors, you can use extension template / Rush

Well no one is going to help you in creating a whole extension.

3 Likes

here you used void change it to Object

1 Like

These are the basics.

2 Likes

Hi @Faraz_Firoz as @Know_About_IT commented I would suggest to learn a few things.
Java and basics of Annotations and Classes before starting to develop more complex extensions..
for example start learning by creating extensions that uses Integers or Strings

As my fist extension I made a extension that could return a list of links present in a given sentence

Also I would suggest not to use Appybuilder IDE instead something like extension-template or Appinventor sources or Rush
Extension template is way faster than Appinventor sources as it only compiles the extension files and Appinventor sources also compiles the components present in the components folder.

  1. https://github.com/mit-cml/appinventor-extensions (Extension Template)
  2. https://github.com/mit-cml/appinventor-sources (Appinventor Sources)
  3. Rush • A new and improved way of building extensions (Rush)

And for the IDE I will suggest to install VSCode as its suited for begginers and has mostly all functions that you can think of.

2 Likes

Thanks a lot lot lot to all of you

3 Likes

Welcome! Hope it helped and don't take my words harshly :slight_smile:

1 Like

No problem, Thanks for advicing me

3 Likes

I was also facing this error and thought it was my own IDE's fault, but then I discovered I did something silly :sweat_smile:. I have put the return inside a Void subroutine. You can't use return in a Void as it is a subroutine and subroutines don't return any value.

So, we all learned that we need to learn and practice Java and understand programming concepts :slight_smile: Thank you!

P.S. I apologize for bumping this topic.

P.S.2. Anyone can close this topic.