Cannot resolve com.amazonaws:aws-android-sdk-lambda:2.2.+ - android

I am developing android app backend with amazon cognito and lambda.
My Code:
package digits.digitsapp;
import com.amazonaws.mobileconnectors.lambdainvoker.LambdaFunction;
public interface MyInterface {
#LambdaFunction
String digitsLogin(PhoneInfo phoneInfo);
#LambdaFunction(functionName = "digitsLogin")
void noDigitsLogin(PhoneInfo phoneInfo);
}
app(build.gradle) :
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.2"
defaultConfig {
applicationId "com.testing"
minSdkVersion 15
targetSdkVersion 23
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:23.2.0'
compile 'com.android.support:design:23.2.0'
compile 'com.amazonaws:aws-android-sdk-core:2.+'
compile 'com.amazonaws:aws-android-sdk-cognito:2.+'
compile 'com.amazonaws:aws-android-sdk-s3:2.+'
compile 'com.amazonaws:aws-android-sdk-ddb:2.+'
compile 'com.amazonaws:aws-android-sdk-lambda:2.2.+'
}
My problem is Error:(39, 13) Failed to resolve: com.amazonaws:aws-android-sdk-lambda:2.2.+
when i add lambda sdk then i sync gradle then error comes.
please tell me what to do

Related

Android apps crash when excute "startservice()" on sdk 25 and lower

In my apps i used a service class for sync data from my server. It's working fine before for all type device. Now it's work only for 26+ SDK device, and crushed on 25 and lower SDK. It's crushed when execute startService(intent). And can't get any exception in try catch .
Here is my activity code :
try {
if(!isMyServiceRunning(SyncdataService.class)){
Intent intent = new Intent(this, SyncdataService.class);
stopService(intent);
startService(intent);
}
}catch (Exception e){
Log.d("Exception", "Error: " + e.toString());
}
And This is my Gradel :
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.catalystconnect.catalystconnect"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
useLibrary 'org.apache.http.legacy'
}
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:26.+'
compile 'com.android.support:design:26.+'
compile 'com.android.support:support-vector-drawable:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:26.+'
compile 'com.joanzapata.iconify:android-iconify-fontawesome:2.1.+'
compile 'me.leolin:ShortcutBadger:1.1.8'
compile 'com.google.firebase:firebase-core:10.0.1'
testCompile 'junit:junit:4.12'
compile 'com.twilio:voice-android:2.0.4'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.squareup.retrofit:retrofit:1.9.0'
compile 'com.koushikdutta.ion:ion:2.1.8'
compile 'com.google.firebase:firebase-messaging:10.0.1'
}
apply plugin: 'com.google.gms.google-services'
Why this happen ?

Unable to resolve dependency for ':app#debug/compileClasspath': Could not resolve project :learncodings

Am adding learncoding project to my project us module dependency but it shows this error.
Any one please help me. below gradle is my app's gradle
android {
compileSdkVersion 23
buildToolsVersion '26.0.2'
aaptOptions {
cruncherEnabled = false
}
defaultConfig {
applicationId "com.droidacademy.codings"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
// Enabling multidex support.
multiDexEnabled true
}
sourceSets {
main {
assets.srcDirs = ['src/main/assets', 'src/main/assets/', 'src/main/assets/c_outputs']
res.srcDirs = ['src/main/res', 'src/main/res/anim', 'src/main/res/layout-sw600dp']
}
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
repositories {
mavenCentral()
jcenter()
}
repositories {
maven { url "https://jitpack.io" }
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile files('libs/volley.jar')
compile files('libs/achartengine-1.0.0.jar')
compile files('libs/gson-1.7.jar')
compile 'com.github.florent37:materialtextfield:1.0.5'
compile files('libs/activation.jar')
compile files('libs/additionnal.jar')
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.felipecsl.asymmetricgridview:library:2.0.1'
compile files('libs/mail.jar')
compile 'com.github.PhilJay:MPAndroidChart:v2.2.4'
compile 'com.intuit.sdp:sdp-android:1.0.4'
compile 'com.squareup.picasso:picasso:2.5.2'
implementation project(':learncodings')
}
and this is my module app's Gradle
android {
compileSdkVersion 23
buildToolsVersion '26.0.2'
aaptOptions {
cruncherEnabled = false
}
defaultConfig {
applicationId "com.whalts.learncoding"
minSdkVersion 15
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'de.hdodenhof:circleimageview:2.0.0'
compile 'com.android.support:cardview-v7:23.4.0'
compile 'com.android.support:recyclerview-v7:23.4.0'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.google.android.gms:play-services-gcm:9.2.0'
compile 'com.google.android.gms:play-services-ads:9.2.0'
}
Go to File\Settings\Gradle. Deselect the "Offline work" box.
If this didn't work Try to Invalidate Cache/Restart

Gradle Sync Failed..could not find method lintOptions() for argument Could not get unknown property 'compile' for object

this is my build.gradle file please help me out ..
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.androidhive.info.weplanbeta"
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'
}
}
lintOptions {
abortOnError false
}
}
these are the dependencies i think i have organized them properly but still its not running
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.mikepenz:materialdrawer:5.3.1#aar') {
transitive = true
}
compile 'com.android.support:appcompat-v7:25.3.0'
compile 'com.android.support:design:25.3.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:9.0.2'
compile 'com.ncapdevi:frag-nav:1.0.3'
compile 'com.roughike:bottom-bar:1.3.9'
compile 'com.android.support:support-v4:25.3.0'
compile 'com.android.support:recyclerview-v7:25.3.0'
compile 'com.android.volley:volley:1.0.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
You should enable lintOptions
android {
...
lintOptions {
checkReleaseBuilds false
abortOnError false
ignoreWarnings true //false
}
}
And
implementation 'com.android.support:appcompat-v7:25.1.0'
implementation 'com.android.support:design:25.1.0'
implementation 'com.android.support:support-v4:25.1.0'
implementation 'com.android.support:recyclerview-v7:25.1.0'

Android app:transformClassesWithJarMergingForDebugAndroidTest

I try to launch automatic test
#RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
#Rule public final ActivityTestRule<OrderManagementActivity> main = new ActivityTestRule<OrderManagementActivity>(OrderManagementActivity.class);
#Test
public void shouldBeAbleToLaunchMainScreen(){
onView(withId(R.id.but_continue)).check(ViewAssertions.matches(isDisplayed()));
}
}
and I'm getting this execution failed for task.
Error:Execution failed for task':app:transformClassesWithJarMergingForDebugAndroidTest'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/junit/ClassRule.class
This is my gradle file
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt'
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
applicationId "xx.zakupy"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support:cardview-v7:25.0.1'
compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
compile 'com.google.dagger:dagger:2.8'
apt 'com.google.dagger:dagger-compiler:2.8'
compile 'joda-time:joda-time:2.9.7'
compile "org.parceler:parceler-api:1.1.6"
apt "org.parceler:parceler:1.1.6"
compile 'com.google.android.gms:play-services-location:10.0.1'
compile 'com.google.android.gms:play-services-maps:10.0.1'
testCompile 'junit:junit:4.12'
androidTestCompile 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestCompile 'com.android.support.test:testing-support-lib:0.1'
}

cannot Resolve Symbol BR -challenge.mobile.codetribe.databind.BR

apply plugin: 'com.android.application'
apply plugin: 'com.android.databinding'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "challenge.mobile.codetribe.databind"
minSdkVersion 23
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
dataBinding {
enabled = true
}
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:23.1.0'
compile 'com.android.support:recyclerview-v7:23.1.0'
}

Categories

Resources