user820913
user820913

Reputation: 619

java.lang.illegalArgumentException in Android Studio

Please help! I am not a very experienced android developer, more on hobby basis, so i apology for my lack of knowledge. I have been working with an android project for a time. Suddenly today when I try to run the application in emulator-mode it won´t start. I get the following message:

Excecution failed java.lang.IllegalArgumentException (no error message)

I have posted a print of the logcat under, which does not refere to any of my java-files.

I have been searching all around for the similar problem, but can´t find any solution, except that it must have to do with a java-method being called with incorrect arguments. Going over all the java code, Android studio doesn´t indicate which method at all being the problem. Yesterday everything worked fine. enter image description here

Does anyone have any idea what the problem could be? I really don´t have a clue about what to do next, and my project is temporary useless...

The gradle-file:

apply plugin: 'com.android.application'

android {
compileSdkVersion 24
buildToolsVersion '25.0.0'

defaultConfig {
    applicationId "com.example.riverfjord.prehospitaltraumasimuator"
    minSdkVersion 15
    targetSdkVersion 24
    versionCode 1
    versionName "1.0"
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'
    }
}
}

  dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.2.0'
}

There is extremely much text in the logcat, so i really don´t know which part to post...

Upvotes: 0

Views: 6781

Answers (2)

Farid Sharif Moghaddam
Farid Sharif Moghaddam

Reputation: 167

1- Build -> Clean project then Rebuild project

2-If doesnt work you should invalidate casches from File->Invalidate Casches/Restart

3-Finaly if it doesnt work delete .gradle folder of project when android studio is close then run android studio and invalidate caches (step 2)

Upvotes: 0

Kapil Rajput
Kapil Rajput

Reputation: 11545

I am not sure May be the issue of Instant Run try to disable it from Android Studio Settings.

Or if don't want to Disable Instant run you can follow this way :

Remove the .idea folder and .gradle folder, then click button sync project with gradle files, after this process finished, Run the app.

Upvotes: 1

Related Questions