0

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...

Kapil Rajput
  • 11,429
  • 9
  • 50
  • 65
user820913
  • 623
  • 4
  • 12
  • 23

2 Answers2

1

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.

Kapil Rajput
  • 11,429
  • 9
  • 50
  • 65
  • Thank you for your reply! Unfortunately There is no setting in my Android Studio for disabling "Instant run". Same problem as in this post: http://stackoverflow.com/questions/38657071/disable-instant-run-android-studio-2-2-preview-5 .Unfortunately I can´t find any solution for it.... – user820913 Mar 16 '17 at 11:17
  • @user820913 try to update your `Android Studio` to `2.3` stable version – Kapil Rajput Mar 16 '17 at 11:28
  • @user820913 if you don't want to update Android Studio follow 2nd step – Kapil Rajput Mar 16 '17 at 11:44
  • 1
    try out 2nd way i.e. remove `.idea` and `.gradle` file ,I have edited my answer please check and tell me if issue is resolved or not – Kapil Rajput Mar 16 '17 at 12:38
  • Try "Build->Clean Project" to remedy this problem. It might help for a while. If it reappears, try clean project again... – Roar Grønmo Apr 13 '18 at 11:10
0

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)