gluonhq / AttachExtended

An extension of Gluon Attach, showing how to create custom Attach services
GNU General Public License v3.0
3 stars 7 forks source link

attach-extended in build.gradle #1

Closed websystemtechnology closed 2 years ago

websystemtechnology commented 2 years ago

I have a gradle project, not maven, and therefore I don't have the pom.xml file. In my build.gradle, how can I "translate" the following dependency in the original pom.xml:

    <dependency>
        <groupId>com.gluonhq.attachextended</groupId>
        <artifactId>log</artifactId>
        <version>4.0.12</version>
    </dependency>
    <dependency>
        <groupId->com.gluonhq.attachextended</groupId>
        <artifactId>log</artifactId>
        <version>4.0.12</version>
        <classifier>desktop</classifier>
        <scope>runtime</scope>
    </dependency>

in my build.gradle. For example:

    compile group: 'attach-extended', name: 'log', version: '4.0.12', classifier: 'android'
jperedadnr commented 2 years ago

Maven coordinates are easily translated from Maven pom to Gradle build:

groupId:artifactId:version(:classifier)

dependencies {
   implementation "com.gluonhq.attachextended:log:4.0.12"
   runtimeOnly "com.gluonhq.attachextended:log:4.0.12:desktop"
}
websystemtechnology commented 2 years ago

runtimeOnly "com.gluonhq.attachextended:log:4.0.12:desktop"

I try, but i have this error: 01-27 18:20:17.909 28513 28513 E AndroidRuntime: FATAL EXCEPTION: main 01-27 18:20:17.909 28513 28513 E AndroidRuntime: Process: it.apptest.demoapp, PID: 28513 01-27 18:20:17.909 28513 28513 E AndroidRuntime: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "__android_log_print" referenced by "/data/app/~~S2xXpvrnQk1AC0rBuWmyGg==/it.apptest.demoapp-p-lNNWkhGXUyInDsamqkXA==/lib/arm64/libsubstrate.so"... 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:1087) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at java.lang.Runtime.loadLibrary0(Runtime.java:1008) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at java.lang.System.loadLibrary(System.java:1664) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at com.gluonhq.helloandroid.MainActivity.surfaceCreated(MainActivity.java:104) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at android.view.SurfaceView.updateSurface(SurfaceView.java:1265) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at android.view.SurfaceView.lambda$new$0$SurfaceView(SurfaceView.java:179) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at android.view.-$$Lambda$SurfaceView$w68OV7dB_zKVNsA-r0IrAUtyWas.onPreDraw(Unknown Source:2) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:1093) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3205) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2057) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8360) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1058) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at android.view.Choreographer.doCallbacks(Choreographer.java:880) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at android.view.Choreographer.doFrame(Choreographer.java:813) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1043) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at android.os.Handler.handleCallback(Handler.java:938) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:99) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at android.os.Looper.loop(Looper.java:236) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:7861) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:600) 01-27 18:20:17.909 28513 28513 E AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:967)

jperedadnr commented 2 years ago

Are you using the android classifier instead of desktop??

websystemtechnology commented 2 years ago

Are you using the android classifier instead of desktop??

Yes