Can anyone help me how to solve this! It was working yesterday, but today when I run my app again this morning, it is not working.
This is my build.gladle...
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.0"
repositories {
mavenCentral()
}
defaultConfig {
applicationId "com.brandtechnosolutions.petbaazar"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
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:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.google.android.gms:play-services:9.8.0'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.android.support:support-v4:25.1.0'
compile `enter code here`'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
testCompile 'junit:junit:4.12'
}
I have tried to use this...
defaultConfig {
...
minSdkVersion 15
targetSdkVersion 23
...
// Enabling multidex support.
multiDexEnabled true
}
and this...
dependencies {
compile 'com.android.support:multidex:1.0.0'
}
but then a new error comes...
Could not find method logIn(View) in a parent or ancestor Context for android:onClick attribute defined on view class
This is logIn() method in my MainActivity...
void logIn(View view) { //called when log in button pressed
Intent intent = new Intent(MainActivity.this, LoginActivity.class);
startActivity(intent); // start web activity
}
Also Instant Run is not working in android studio... shows error:
Execution failed for task ':app:clean'. Unable to delete file
when I enable the instant run. Please help!