android-vision
android-vision copied to clipboard
Error, What should I do?
ERROR: Failed to resolve: com.android.support:support-v4:24.2.0 Add Google Maven repository and sync project Show in Project Structure dialog Affected Modules: app
ERROR: Failed to resolve: com.android.support:design:24.2.0 Add Google Maven repository and sync project Show in Project Structure dialog Affected Modules: app
ERROR: Failed to resolve: com.google.android.gms:play-services-vision:9.4.0+ Install Repository and sync project Show in Project Structure dialog Affected Modules: app
ERROR: The minSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file. Remove minSdkVersion and sync project Affected Modules: app
WARNING: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'. It will be removed at the end of 2018. For more information see: http://d.android.com/r/tools/update-dependency-configurations.html Affected Modules: app
WARNING: The specified Android SDK Build Tools version (24.0.2) is ignored, as it is below the minimum supported version (28.0.3) for Android Gradle Plugin 3.4.0. Android SDK Build Tools 28.0.3 will be used. To suppress this warning, remove "buildToolsVersion '24.0.2'" from your build.gradle file, as each version of the Android Gradle Plugin now has a default version of the build tools. Remove Build Tools version and sync project Affected Modules: app
WARNING: The targetSdk version should not be declared in the android manifest file. You can move the version from the manifest to the defaultConfig in the build.gradle file. Remove targetSdkVersion and sync project Affected Modules: app
Here's the app/build.gradle file that worked for me:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
// buildToolsVersion '25.0.0'
defaultConfig {
applicationId "com.google.android.gms.samples.vision.ocrreader"
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:support-v4:26+'
implementation 'com.google.android.gms:play-services-vision:15+'
implementation 'com.android.support:design:26+'
}