Rush β€’ A new and improved way of building extensions

(post deleted by author)

You must NEVER post logs like that, pass it as a file.

1 Like

thanks done deleted

how hide warn class when use rush build -r

Use progaurd’s dontwarn flag

1 Like

yes. thank u

last day my billing succes and lounch to playstore succes… but today when i make rebuild again extension… and get notif cannot recast repack.s
pliss help

1 Like

I receive this error;

is it possible to increase the API level ? in rush ? its just i am using some functions which are only available in latest android and i cant use it through extension created by rush ?

i got this error please help, i’m beginner on this fild

β€’ Build initialized

β”Œ Checking project files
β”‚ info Checking metadata file (rush.yml)
β”‚ info Checking AndroidManifest.xml file
β”” done
β”Œ Compiling sources
β”‚ info Picked 1 source file
β”” done
β”Œ Processing the extension
β”‚ info Desugaring Java 8 language features
β”‚      Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
β”‚ warn An illegal reflective access operation has occurred
β”‚ warn Illegal reflective access by com.google.devtools.build.android.desugar.Desugar (file:/C:/Users/barma/AppData/Roaming/rush/tools/other/desugar.jar) to field java.lang.invoke.InnerClassLambdaMetafactory.dumper
β”‚ warn Please consider reporting this to the maintainers of com.google.devtools.build.android.desugar.Desugar
β”‚ warn Use --illegal-access=warn to enable warnings of further illegal reflective access operations
β”‚ warn All illegal access operations will be denied in a future release
β”‚      Exception in thread "main" java.lang.NullPointerException: Failed to register lambda dump directory 'C:\Users\barma\AppData\Local\Temp\lambdas12860440694947199928'
β”‚       at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:987)
β”‚       at com.google.devtools.build.android.desugar.Desugar.verifyLambdaDumpDirectoryRegistered(Desugar.java:1035)
β”‚       at com.google.devtools.build.android.desugar.Desugar.main(Desugar.java:956)
β”” failed

Try with these changes into rush.yml

desugar:
    enable: true
    desugar_deps: false

now return this:

β”Œ Compiling sources
β”‚ info Picked 1 source file
β”‚      Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true
β”‚ warn Supported source version 'RELEASE_8' from annotation processor 'io.shreyash.rush.ExtensionProcessor' less than -source '11'
β”‚
β”‚ erro src\com\bibek\deviceinfo\DeviceInfo.java:23: cannot find symbol
β”‚              return form.getAppVersionName(); // Use the correct method
β”‚                         ^
β”‚        symbol:   method getAppVersionName()
β”‚        location: variable form of type Form
β”‚ erro src\com\bibek\deviceinfo\DeviceInfo.java:28: cannot find symbol
β”‚              return form.getAppVersionCode(); // Use the correct method
β”‚                         ^
β”‚        symbol:   method getAppVersionCode()
β”‚        location: variable form of type Form
β”” failed

β€’ Build failed [5s 185ms] [2 errors; 1 warning]

These methods are not available in Rush on runtime.jar
You may make mockup classes for them.

Is rush available for Smartphones?

No, you can’t run Rush on smart phone.

need help:
Screenshot 2024-04-09 135954

package com.bibek.VideoPlayer;

import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.net.Uri;
import androidx.media2.player.MediaPlayer;
import androidx.media2.widget.VideoView;
import com.google.appinventor.components.annotations.SimpleFunction;
import com.google.appinventor.components.runtime.AndroidNonvisibleComponent;
import com.google.appinventor.components.runtime.ComponentContainer;

import java.io.InputStream;
import java.net.URL;

public class VideoPlayer extends AndroidNonvisibleComponent {
  private MediaPlayer mediaPlayer;
  private VideoView videoView;
  private ImageView thumbnailView;

  public VideoPlayer(ComponentContainer container) {
    super(container.$form());
    Context context = container.$context();
    mediaPlayer = new MediaPlayer(context);
    videoView = new VideoView(context);
    videoView.setPlayer(mediaPlayer);
    thumbnailView = new ImageView(context);
  }

  @SimpleFunction(description = "Initialize a video player inside an arrangement with a video path or URL and a thumbnail path or URL.")
  public void InitializeVideoPlayer(HorizontalArrangement parentLayout, String videoPath, String thumbnailPath) {
    try {
      // Set the video URI.
      Uri videoUri = Uri.parse(videoPath);
      mediaPlayer.setMediaItem(MediaItem.fromUri(videoUri));
      mediaPlayer.prepare();

      // Download and set the thumbnail.
      InputStream is = new URL(thumbnailPath).openStream();
      Bitmap bitmap = BitmapFactory.decodeStream(is);
      thumbnailView.setImageBitmap(bitmap);

      // Add the video view and thumbnail view to the parent layout.
      parentLayout.addView(videoView);
      parentLayout.addView(thumbnailView);
    } catch (Exception e) {
      e.printStackTrace();
    }
  }
}

when i compile it getting error:

β€’ Build initialized

β”Œ Checking project files
β”‚ info Checking metadata file (rush.yml)
β”‚ info Checking AndroidManifest.xml file
β”” done
β”Œ Compiling sources
β”‚ info Picked 1 source file
β”‚ erro src\com\bibek\VideoPlayer\VideoPlayer.java:7: package androidx.media2.player does not exist
β”‚      import androidx.media2.player.MediaPlayer;
β”‚                                   ^
β”‚ erro src\com\bibek\VideoPlayer\VideoPlayer.java:8: package androidx.media2.widget does not exist
β”‚      import androidx.media2.widget.VideoView;
β”‚                                   ^
β”‚ erro src\com\bibek\VideoPlayer\VideoPlayer.java:17: cannot find symbol
β”‚        private MediaPlayer mediaPlayer;
β”‚                ^
β”‚        symbol:   class MediaPlayer
β”‚        location: class VideoPlayer
β”‚ erro src\com\bibek\VideoPlayer\VideoPlayer.java:18: cannot find symbol
β”‚        private VideoView videoView;
β”‚                ^
β”‚        symbol:   class VideoView
β”‚        location: class VideoPlayer
β”‚ erro src\com\bibek\VideoPlayer\VideoPlayer.java:19: cannot find symbol
β”‚        private ImageView thumbnailView;
β”‚                ^
β”‚        symbol:   class ImageView
β”‚        location: class VideoPlayer
β”‚ erro src\com\bibek\VideoPlayer\VideoPlayer.java:31: cannot find symbol
β”‚        public void InitializeVideoPlayer(HorizontalArrangement parentLayout, String videoPath, String thumbnailPath) {
β”‚                                          ^
β”‚        symbol:   class HorizontalArrangement
β”‚        location: class VideoPlayer
β”‚      An annotation processor threw an uncaught exception.
β”‚      Consult the following stack trace for details.
β”‚      java.lang.IllegalStateException
β”‚       at io.shreyash.rush.util.ConvertToYailTypeKt.convert(ConvertToYailType.kt:142)
β”‚       at io.shreyash.rush.block.BlockWithParams.params(BlockWithParams.kt:16)
β”‚       at io.shreyash.rush.block.Method.runChecks(Method.kt:31)
β”‚       at io.shreyash.rush.block.Method.<init>(Method.kt:16)
β”‚       at io.shreyash.rush.ExtensionProcessor.process(ExtensionProcessor.kt:68)
β”‚       at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
β”‚       at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
β”‚       at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
β”‚       at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
β”‚       at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
β”‚       at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
β”‚       at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
β”‚       at com.sun.tools.javac.main.Main.compile(Main.java:523)
β”‚       at com.sun.tools.javac.main.Main.compile(Main.java:381)
β”‚       at com.sun.tools.javac.main.Main.compile(Main.java:370)
β”‚       at com.sun.tools.javac.main.Main.compile(Main.java:361)
β”‚       at com.sun.tools.javac.Main.compile(Main.java:56)
β”‚       at com.sun.tools.javac.Main.main(Main.java:42)
β”” failed

β€’ Build failed [1s 546ms] [6 errors]```

how to uninstall or remove rush completely from my pc?

Try to rename your extension class to be like VideoPlayerPro or something else

Or you will need to edit you this

To be like

private androidx.media2.widget.VideoView videoView;

Can we use Kotlin coroutines in rush? I have imported the library but getting errors.
cannot access

kotlinx.coroutines.CoroutineScope

which is a supertype of

example.com.Client

. Check your module classpath for missing or conflicting dependencies
Screenshot 2024-04-22 at 11.16.42 AM

β”Œ Compiling sources
β”‚ info Picked 1 source file
β”‚ An annotation processor threw an uncaught exception.
β”‚ Consult the following stack trace for details.
β”‚ java.lang.IllegalStateException
β”‚ at io.shreyash.rush.util.ConvertToYailTypeKt.convert(ConvertToYailType.kt:142)
β”‚ at io.shreyash.rush.block.BlockWithParams.params(BlockWithParams.kt:16)
β”‚ at io.shreyash.rush.block.Method.runChecks(Method.kt:31)
β”‚ at io.shreyash.rush.block.Method.(Method.kt:16)
β”‚ at io.shreyash.rush.ExtensionProcessor.process(ExtensionProcessor.kt:68)
β”‚ at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:794)
β”‚ at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:705)
β”‚ at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
β”‚ at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
β”‚ at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
β”‚ at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1170)
β”‚ at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:856)
β”‚ at com.sun.tools.javac.main.Main.compile(Main.java:523)
β”‚ at com.sun.tools.javac.main.Main.compile(Main.java:381)
β”‚ at com.sun.tools.javac.main.Main.compile(Main.java:370)
β”‚ at com.sun.tools.javac.main.Main.compile(Main.java:361)
β”‚ at com.sun.tools.javac.Main.compile(Main.java:56)
β”‚ at com.sun.tools.javac.Main.main(Main.java:42)
β”” failed