Anyone can fix this for me? Only 4 Line Coding For Extension

Can you fix this error for me? (4Line Code Only)
I want to make a extension for replace text with another text, but can’t do.
If anyone can do this, please fix this code. Advance thanks.

If anyone can do it, please help me?

You can’t return something from a void, as you return a Stirng object change the return type to String for example.
Also, what’s the point of using private variables inside your method, it’d be better if you used local variables, eg:

String hello = "hi";

P.S: of you’ve any questions about extension developing, the best place to ask is the app Inventor, extension development category:

5 Likes

It will show an error in the build log with an arrow^ and specifies the error at the side

It will be frustrating when you are a beginner and it takes 5 minutes to build and gives you an error.
I recommend you to use the Colintree extension builder.

Colintree Extension Builder
http://bot.colintree.cn:8048

Method 1:
Download java file from the appybuilder code editor and upload it to the Colintree extension builder.

Method 2
Use IntelliJ Idea as a code editor.
It will automatically save when you edit code
It will save in path like
C:\\Users\\Name\\Idea Projects\\Project name\\Java file
Upload the file to the Colin tree extension builder.

http://bot.colintree.cn:8048/ not working in my Android device