question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android gradle build error: java.lang.ArrayIndexOutOfBoundsException by 1.0.0-beta6

See original GitHub issue

Issue Description

Android gradle build error: java.lang.ArrayIndexOutOfBoundsException by 1.0.0-beta6.

Just try to update to beta6 in gradle, and the project can work well with beta4 or beta5.

Please double-check my gradle if any missing.

Many thanks.

Version Information

1.0.0-beta6 Mac Catalina 10.15.1

Additional Information

Caused by: java.lang.ArrayIndexOutOfBoundsException: 65535

Contributing

apply plugin: 'com.android.application'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "mdl.zac.com.fgdroidapp"
        minSdkVersion 27
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        // handle methods too much issue
        multiDexEnabled true
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/DEPENDENCIES.txt'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/license.txt'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/NOTICE.txt'
        exclude 'META-INF/notice.txt'
        exclude 'META-INF/INDEX.LIST'
    }
}

repositories {
    mavenCentral()

    // draw chart
//    maven { url 'https://jitpack.io' }
}

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])


//    implementation "androidx.appcompat:appcompat:1.0.2"
//    implementation 'com.google.android.material:material:1.0.0'

    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'


    implementation (group: 'org.deeplearning4j', name: 'deeplearning4j-core', version: '1.0.0-beta6') {
        exclude group: 'org.bytedeco', module: 'opencv-platform'
        exclude group: 'org.bytedeco', module: 'leptonica-platform'
        exclude group: 'org.bytedeco', module: 'hdf5-platform'
        exclude group: 'org.nd4j', module: 'nd4j-base64'
    }
    implementation group: 'org.nd4j', name: 'nd4j-native', version: '1.0.0-beta6'
    implementation group: 'org.nd4j', name: 'nd4j-native', version: '1.0.0-beta6', classifier: "android-arm"
    implementation group: 'org.nd4j', name: 'nd4j-native', version: '1.0.0-beta6', classifier: "android-arm64"
    implementation group: 'org.nd4j', name: 'nd4j-native', version: '1.0.0-beta6', classifier: "android-x86"
    implementation group: 'org.nd4j', name: 'nd4j-native', version: '1.0.0-beta6', classifier: "android-x86_64"
    implementation group: 'org.bytedeco', name: 'openblas', version: '0.3.5-1.5'
    implementation group: 'org.bytedeco', name: 'openblas', version: '0.3.5-1.5', classifier: "android-arm"
    implementation group: 'org.bytedeco', name: 'openblas', version: '0.3.5-1.5', classifier: "android-arm64"
    implementation group: 'org.bytedeco', name: 'openblas', version: '0.3.5-1.5', classifier: "android-x86"
    implementation group: 'org.bytedeco', name: 'openblas', version: '0.3.5-1.5', classifier: "android-x86_64"
    implementation group: 'org.bytedeco', name: 'opencv', version: '4.0.1-1.5'
    implementation group: 'org.bytedeco', name: 'opencv', version: '4.0.1-1.5', classifier: "android-arm"
    implementation group: 'org.bytedeco', name: 'opencv', version: '4.0.1-1.5', classifier: "android-arm64"
    implementation group: 'org.bytedeco', name: 'opencv', version: '4.0.1-1.5', classifier: "android-x86"
    implementation group: 'org.bytedeco', name: 'opencv', version: '4.0.1-1.5', classifier: "android-x86_64"
    implementation group: 'org.bytedeco', name: 'leptonica', version: '1.78.0-1.5'
    implementation group: 'org.bytedeco', name: 'leptonica', version: '1.78.0-1.5', classifier: "android-arm"
    implementation group: 'org.bytedeco', name: 'leptonica', version: '1.78.0-1.5', classifier: "android-arm64"
    implementation group: 'org.bytedeco', name: 'leptonica', version: '1.78.0-1.5', classifier: "android-x86"
    implementation group: 'org.bytedeco', name: 'leptonica', version: '1.78.0-1.5', classifier: "android-x86_64"


    // draw chart
//    implementation 'com.github.PhilJay:MPAndroidChart:v3.1.0'

}

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
saudetcommented, May 12, 2020

Yes, that’s an issue with your version of the SDK. You’ll need to figure out why it’s not using the latest version…

0reactions
zhangy10commented, May 12, 2020

@saudet All right, thanks for that. I will check that and make sure to use the right version.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android gradle build error: java.lang ... - GitHub
Issue Description Android gradle build error: java.lang.ArrayIndexOutOfBoundsException by 1.0.0-beta6. Just try to update to beta6 in gradle ...
Read more >
Stack Overflow
1 like I was told, and Android Gradle Plugin to 4.2.0. If I update the AGP, my app no longer builds. I don't...
Read more >
Navigation | Android Developers
To generate Java language code suitable for Java or mixed Java and Kotlin modules, add this line to your app or module's build.gradle...
Read more >
Gradle Build Tool
Accelerate developer productivity. Gradle helps teams build, automate and deliver better software, faster.
Read more >
Xamarin Forms application error java.lang ...
java.lang.ArrayIndexOutOfBoundsException : Index 4 out of bounds for length 4. Visual Studiowindows 10.0visual studiovisual studio 2022 version 17.0.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found