I am trying to wrap NotificationCompat.MediaStyle and it seems to compile fine but the application crashes immediately with this log
Source code is as simple as
What do you suggest ?
Sorry for asking too much these days , I am always looking for things but usually search is enough
B4X:
starter_downloadfile (java line: 163)
java.lang.NoClassDefFoundError: Failed resolution of: Landroid/support/v4/media/app/NotificationCompat$MediaStyle;
at smm.pktyle.MediaStyleBA._initialize(MediaStyleBA.java:55)
at smm.pktyle.MediaStyleBA.Initialize(MediaStyleBA.java:45)
at b4a.example.starter._downloadfile(starter.java:163)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at anywheresoftware.b4a.keywords.Common.CallSub4(Common.java:897)
at anywheresoftware.b4a.keywords.Common.CallSubNew(Common.java:831)
at b4a.example.main._activity_create(main.java:335)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
at b4a.example.main.afterFirstLayout(main.java:102)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6718)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.ClassNotFoundException: Didn't find class "android.support.v4.media.app.NotificationCompat$MediaStyle" on path: DexPathList[[zip file "/system/framework/org.apache.http.legacy.boot.jar", zip file "/data/app/b4a.example-xQZ0zBa3LgeEw-RxsnHrBQ==/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example-xQZ0zBa3LgeEw-RxsnHrBQ==/lib/arm64, /system/lib64, /vendor/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
Source code is as simple as
B4X:
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.net.Uri;
import android.os.Environment;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.View;
import android.view.View.OnTouchListener;
import android.view.ViewGroup;
import anywheresoftware.b4a.BA;
import anywheresoftware.b4a.BA.Events;
import anywheresoftware.b4a.BA.Hide;
import anywheresoftware.b4a.BA.Pixel;
import anywheresoftware.b4a.BA.ShortName;
import anywheresoftware.b4a.BA.Version;
import anywheresoftware.b4a.AbsObjectWrapper;
import anywheresoftware.b4a.BA.Author;
import anywheresoftware.b4a.BA.DependsOn;
import anywheresoftware.b4a.BA.ActivityObject;
import android.support.v4.app.NotificationCompat;
import android.support.v4.content.ContextCompat;
import android.support.v4.media.app.NotificationCompat.MediaStyle;
@Version(0.01f)
@ShortName("MediaStyle")
@Author("SMM")
@DependsOn(values={"com.android.support:support-v4"})
public class MediaStyleBA extends AbsObjectWrapper<MediaStyle> {
private BA ba;
private MediaStyle obj;
private String eventName;
public void Initialize(BA ba , String EventName ) {
_initialize(ba, EventName);
}
@Hide
public void _initialize(final BA ba,String EventName) {
this.ba = ba;
this.eventName = EventName.toLowerCase(BA.cul);
AttributeSet myAttributes = null;
obj = new MediaStyle();
this.setObject(obj);
}
}
What do you suggest ?
Sorry for asking too much these days , I am always looking for things but usually search is enough