android-issue-reporter: Exception on activity creation?

I’m trying to implement the issue reporter screen in my app. Here’s my code:


public class ReporterActivity extends IssueReporterActivity {
    //Where should the issues go?
    //(http://github.com/username/repository)
    @Override
    public GithubTarget getTarget() {
        return new GithubTarget("rosenpin", "AlwaysOnDisplayAmoled");
    }

    //[Optional] Auth token to open issues if users don't have a GitHub account
    //You can register a bot account on GitHub and copy ist OAuth2 token here.
    @Override
    public String getGuestToken() {
        return "MY_CODE";
    }

    //[Optional] Include other relevant info in the bug report (like custom variables)
    @Override
    public void onSaveExtraInfo(ExtraInfo extraInfo) {
        extraInfo.put("Test 1", "Example string");
        extraInfo.put("Test 2", true);
    }
}

And then

startActivity(new Intent(getApplicationContext(),ReporterActivity.class));

But after I call the startActivity I get this exception in the ReporterActivity class

java.lang.RuntimeException: Unable to start activity ComponentInfo{com.tomer.alwayson/com.tomer.alwayson.Activities.ReporterActivity}: android.view.InflateException: Binary XML file line #37: Binary XML file line #2: Error inflating class android.support.v7.widget.CardView

Here’s my app gradle file


apply plugin: 'com.android.application'

android {
    compileSdkVersion 24
    buildToolsVersion "24.0.0"

    defaultConfig {
        applicationId "com.tomer.alwayson"
        minSdkVersion 19
        targetSdkVersion 24
        versionCode 107
        versionName "0.87 B"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
    lintOptions {
        abortOnError false
    }
}

repositories {
    mavenCentral()
}

dependencies {
    compile 'com.heinrichreimersoftware:android-issue-reporter:1.2.5'
    compile 'com.android.support:appcompat-v7:24.0.0'
    compile 'com.android.support:cardview-v7:24.0.0'
    compile 'com.android.support:design:24.0.0'
    compile 'eu.chainfire:libsuperuser:1.0.0.201602271131'
    compile 'com.github.paolorotolo:appintro:4.0.0'
    compile('de.psdev.licensesdialog:licensesdialog:1.8.1')
    compile 'com.afollestad.material-dialogs:commons:0.8.6.0'
    compile project(':lib')
    testCompile 'junit:junit:4.12'
}

And this is my project top level gradle file


buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.2'
    }
}

allprojects {
    repositories {
        jcenter()
        maven { url "https://jitpack.io" }
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (15 by maintainers)

Commits related to this issue

Most upvoted comments

BTW you might also like my app intro library material-intro as a material design alternative to your current intro. It offers cool animations and and adapts the official “Top User Benefits” onboarding pattern 100%.

We can create a list of apps that use this library in the readme if you want 😀

I’ll look into this when I’m at home later today.