Home API 22 5.1 sdk device on android studio 3 (linux pc) java 1.8
Reply: 0

API 22 5.1 sdk device on android studio 3 (linux pc) java 1.8

user4489
1#
user4489 Published in June 23, 2018, 2:43 am

I'm on ubuntu 16 android studio 2.3.3, device tablet 5.1. In my app I have these grandle file ....

apply plugin: 'com.android.application'

android {
    compileSdkVersion 25
    buildToolsVersion "25.0.0"
    defaultConfig {
        applicationId "com.example.bmeccoffice.remotehelp"
        minSdkVersion 22
        targetSdkVersion 22
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        jackOptions {
            enabled true
        }
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }


    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
        incremental false
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
        exclude group: 'com.android.support', module: 'support-annotations'
    })
    compile 'com.android.support:appcompat-v7:26.+'
    compile 'com.android.support:design:26.+'
    compile 'org.webrtc:google-webrtc:1.0.21217'
    testCompile 'junit:junit:4.12'
}

I use an 5.1 device (tablet) and try to compile my symple app (actually only bottom navigation activity layout ... empty ... and nothing else) but I have a long list of 26 error during the Debug ....

Error:Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are android.graphics.SurfaceTexture$OnFrameAvailableListener
Error:Lambda coming from jar file need their interfaces on the classpath to be compiled, unknown interfaces are java.lang.RunnableError:Static method (these error 12 times)
org.webrtc.EglBase create() not supported in Android API level less than 24
Error:Static method org.webrtc.EglBase create(org.webrtc.EglBase$Context sharedContext, int[] configAttributes) not supported in Android API level less than 24
Error:Static method org.webrtc.EglBase create(org.webrtc.EglBase$Context sharedContext) not supported in Android API level less than 24
Error:Static method org.webrtc.EglBase createEgl10(int[] configAttributes) not supported in Android API level less than 24
Error:Static method org.webrtc.EglBase createEgl10(javax.microedition.khronos.egl.EGLContext sharedContext, int[] configAttributes) not supported in Android API level less than 24
Error:Static method org.webrtc.EglBase createEgl14(android.opengl.EGLContext sharedContext, int[] configAttributes) not supported in Android API level less than 24
Error:Static method org.webrtc.EglBase createEgl14(int[] configAttributes) not supported in Android API level less than 24
Error:Execution failed for task ':app:transformClassesWithPreJackPackagedLibrariesForDebug'.
> com.android.build.api.transform.TransformException: com.android.builder.core.JackToolchain$ToolchainException: Jack compilation exception

I've just modified it (before support was for 1_7 version) .... but I have these error .... if return to old version with VERSION_1_7 && jackOptions == false ... obtain these 3 error:

Error:Error converting bytecode to dex:
Cause: Dex cannot parse version 52 byte code.
This is caused by library dependencies that have been compiled using Java    8 or above.
If you are using the 'java' gradle plugin in a library submodule add 
targetCompatibility = '1.7'
sourceCompatibility = '1.7'
to that submodule's build.gradle file.
Error:1 error; aborting
    Error:Execution failed for task ':app:transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException:  java.lang.RuntimeException: java.lang.RuntimeException: Unable to pre-dex '/home/office/.android/build-cache/b4dd2b467a0ed596ad0e2a137856a6897964c81c/output/jars/classes.jar'
    to '/home/office/AndroidStudioProjects/RemoteHelp2/app/build/intermediates /transforms/dex/debug/folders/1000/10 /classes_5110517f2feea04a1d9834af1ccaded1b5e9f0d5'

I have a module ... an external library .. but without dependancy ...

We need to use webrtc API.

some suggest how to solve these error?

EDIT:

remove the module ... nothing change ... same error.

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.315069 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO