Please I really need help with this,
this might seem a duplicate of "'this' is not available" in debug windows of Android Studio
but I need to provide more information to address the specific issue.
So I am in the same situation of the question at the link, but I suspect that it has to do with my build setup.
Please help.
This is my build.gradle:
buildscript {
repositories {
maven { url 'http://download.crashlytics.com/maven' }
mavenCentral()
}
dependencies {
classpath 'com.crashlytics.tools.gradle:crashlytics-gradle:1.+'
classpath 'com.jakewharton.hugo:hugo-plugin:1.2.1'
}
}
apply plugin: 'com.android.application'
apply plugin: 'crashlytics'
apply plugin: 'com.jakewharton.hugo'
repositories {
maven { url 'http://download.crashlytics.com/maven' }
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
maven { url "https://jitpack.io" }
maven { url 'https://dl.bintray.com/kennyc1012/maven' }
}
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.foo"
minSdkVersion 16
targetSdkVersion 21
versionCode 21
versionName "4.7"
}
buildTypes {
debug {
debuggable true
}
}
packagingOptions {
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'LICENSE.txt'
exclude 'META-INF/maven/com.squareup.okhttp/okhttp/pom.xml'
exclude 'META-INF/maven/com.squareup.okhttp/okhttp/pom.properties'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile 'junit:junit:4.12'
androidTestCompile 'org.hamcrest:hamcrest-library:1.3'
compile('com.squareup.retrofit:converter-simplexml:2.0.0-beta2') {
exclude module: 'xpp3'
exclude group: 'stax'
}
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:preference-v7:23.1.1'
compile 'com.android.support:palette-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
compile 'com.octo.android.robospice:robospice-spring-android:1.4.14'
compile 'org.codehaus.jackson:jackson-core-asl:1.9.13'
compile 'com.octo.android.robospice:robospice-ui-spicelist:1.4.14'
compile 'com.crashlytics.android:crashlytics:1.+'
compile 'com.nostra13.universalimageloader:universal-image-loader:1.9.3'
compile 'org.jsoup:jsoup:1.7.2'
compile 'com.ToxicBakery.viewpager.transforms:view-pager-transforms:1.1.0#aar'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.getbase:floatingactionbutton:1.9.0'
compile 'com.android.support:design:23.1.1'
compile 'joda-time:joda-time:2.9.1'
compile 'com.squareup.okhttp:logging-interceptor:2.6.0'
compile 'com.android.support:support-v4:23.1.1'
compile 'com.jayway.android.robotium:robotium-solo:5.5.3'
compile 'com.kennyc:multistateview:1.1'
compile 'com.mikepenz:iconics-core:2.5.2#aar'
compile 'com.mikepenz:fontawesome-typeface:4.5.0.1#aar'
compile 'com.mikepenz:google-material-typeface:2.1.0.1.original#aar'
compile 'me.henrytao:smooth-app-bar-layout:1.0.1'
compile 'fr.avianey.com.viewpagerindicator:library:2.4.1.1#aar'
compile 'com.google.android.gms:play-services-appindexing:8.1.0'
}
this is the top level build.gradle
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
allprojects {
repositories {
jcenter()
}
}
Just remove Hugo, and the problem will be solved. This issue is duplicated and as been already answer in the following post : "'this' is not available" in debug windows of Android Studio
A issue has been published to the Hugo repo.
I meet the same question.Try this method:make your build.gradle have---------> minifyEnabled false.
Sometime i use this way resolve my problem.
This might help, just a silly thing. If you are using minify, then check if it's enabled in debug
buildTypes {
debug {
minifyEnabled true
}
}
To
minifyEnabled false
Related
I am facing this issue, I have done the all mandatory changes , but still facing
build.gradle (project level)
buildscript {
repositories {
jcenter()
google()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
classpath 'io.fabric.tools:gradle:1.25.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.1.0'
}
}
allprojects {
repositories {
jcenter()
google()
maven { url 'https://jitpack.io' }
maven { url 'https://maven.google.com' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle (app level)
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven {
url 'https://repo1.maven.org/maven2/'
}
maven { url 'https://maven.fabric.io/public' }
}
android {
compileSdkVersion 27
buildToolsVersion '27.0.1'
defaultConfig {
applicationId "com.kiran.example.ebitcoin"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
// Enabling multidex support.
multiDexEnabled true
vectorDrawables.useSupportLibrary = true //support color.xml colors in vector image
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
useLibrary 'org.apache.http.legacy'
// for EncodingUtils.getBytes(post_Data, "base64") in actrivitypaymentfrowebview
sourceSets { main { res.srcDirs = ['src/main/res', 'src/main/assets/font'] } }
packagingOptions {
exclude 'META-INF/rxjava.properties'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/notice.txt'
exclude 'META-INF/ASL2.0'
}
}
dependencies {
implementation 'com.google.firebase:firebase-messaging:11.0.4'
implementation 'com.google.firebase:firebase-invites:11.0.4'
implementation 'com.google.firebase:firebase-crash:11.0.4'
compile fileTree(include: ['*.jar'], dir: 'libs')
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:27.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:design:27.0.1'
compile 'com.android.support:support-v13:27.0.1'
testCompile 'junit:junit:4.12'
implementation 'com.android.support:cardview-v7:27.0.1'
compile('com.crashlytics.sdk.android:crashlytics:2.9.2#aar') {
transitive = true;
}
compile 'com.flurry.android:analytics:11.0.0#aar'//flurry sdk of yahoo for crashalytics
//compile 'com.google.code.gson:gson:2.3.1'
//compile 'com.squareup.okhttp:okhttp:2.4.0'
compile 'com.android.support:animated-vector-drawable:27.0.1'
//compile 'com.android.support:customtabs:27.0.1'
//compile 'com.android.support:palette-v7:27.0.1'
compile 'com.android.support:recyclerview-v7:27.0.1'
//to store object in shared pref
// compile 'com.google.code.gson:gson:2.7'
// Retrofit
compile 'com.squareup.retrofit2:retrofit:2.3.0'
// JSON Parsing
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
//add ripple below API 21
//compile 'com.balysv:material-ripple:1.0.2'
//add this dependency to scan QR code
compile 'com.journeyapps:zxing-android-embedded:3.4.0'
//material dialog
// compile 'me.drakeet.materialdialog:library:1.3.1'
//for setting GIF image
//compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.8'
//for material dialogs
//implementation 'com.afollestad.material-dialogs:core:0.9.6.0'
//for sms otp
//compile 'com.github.GoodieBag:Pinview:v1.3'
//PayUMoney
/* compile('com.payumoney.sdkui:plug-n-play:1.1.0') {
transitive = true;
exclude module: 'payumoney-sdk'
}
compile 'com.payumoney.core:payumoney-sdk:7.1.0'*/
//for payment gateway
compile 'com.android.volley:volley:1.1.0'
//enable multiple methods
compile 'com.android.support:multidex:1.0.0'
//contry code selector
//implementation 'com.hbb20:ccp:2.1.4'
//appling font library to app
compile 'uk.co.chrisjenx:calligraphy:2.2.0'
//file compression
compile 'id.zelory:compressor:2.1.0'
//async task test
//compile 'com.loopj.android:android-async-http:1.4.9'
// compile 'cz.msebera.android:httpclient:4.3.6'//upload images to api using this
//progress dialog
//compile 'com.github.d-max:spots-dialog:0.4'
//to load
compile 'com.github.bumptech.glide:glide:3.8.0'
implementation files('libs/android-async-http-1.4.9.jar')
implementation files('libs/android-async-http-1.4.9.jar')
}
apply plugin: 'com.google.gms.google-services'
Make sure all support lib have same version.
There are multiple reasons Why you are getting this error,
First one May be your internet is not working properly because as i see you have used a lots of third party libraries so it will require high speed internet to download.
Second one is may be your project setting is in offline mode Check it by go to File -> Settings -> Build , execution , Development and click Gradle and check weather the "Offline" work checkbox is checked or not.
Third one is may be a cache memory just invalidate and restart the project go to File -> Invalidate Caches / Restart.
Hope this help
I've been working on this Android Project for about a year now, suddenly when I opened it yesterday Android Studio 3.1.2 failed to sync gradle and the project doesn't build anymore giving me this error:
Could not find support-core-ui.jar (com.android.support:support-core-ui:27.1.1).
Searched in the following locations:
https://jcenter.bintray.com/com/android/support/support-core-ui/27.1.1/support-core-ui-27.1.1.jar
Please install the Android Support Repository from the Android SDK Manager.
Open Android SDK Manager
I'm pretty sure that the Android Support Repository is installed correctly because it's working successfully in other projects and all my other projects are working fine with no problems.
I have this gradle file in the app module:
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.21.5'
}
}
plugins {
id 'com.onesignal.androidsdk.onesignal-gradle-plugin' version '0.8.1'
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.neenbedankt.android-apt'
apply plugin: 'realm-android'
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
defaultConfig {
minSdkVersion 16
targetSdkVersion 23
versionCode 32
versionName "3.1"
multiDexEnabled true
manifestPlaceholders = [onesignal_app_id : "",
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: "REMOTE"]
}
configurations {
all*.exclude group: 'com.android.support', module: 'support-v4'
}
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def requested = details.requested
if (requested.group == 'com.android.support') {
if (!requested.name.startsWith("multidex")) {
details.useVersion '27.1.1'
}
}
if (requested.group == 'com.google.android.gms') {
details.useVersion '15.0.1'
}
if (requested.group == 'com.google.firebase') {
details.useVersion '15.0.1'
}
}
}
buildTypes {
release {
minifyEnabled false
// proguardFiles 'proguard.cfg'
}
}
useLibrary 'org.apache.http.legacy'
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/DEPENDENCIES'
}
}
repositories {
maven {
url "https://jitpack.io"
}
maven {
url "https://dl.bintray.com/lukaville/maven"
}
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://maven.google.com' }
mavenCentral()
}
dependencies {
compile project(':FORTSDKv1.4.1')
compile files('libs/nineoldandroids-2.4.0.jar')
compile files('libs/gcm.jar')
compile files('libs/httpclient-4.3.4.jar')
compile files('libs/httpmime-4.2.5.jar')
compile files('libs/HockeySDK-3.0.2.jar')
compile files('libs/samsungpay-1.8.00.jar')
compile project(':library-2.4.1')
// Required for geotagging
compile('com.crashlytics.sdk.android:crashlytics:2.6.8#aar') {
transitive = true
}
compile('com.code-troopers.betterpickers:library:3.1.0') {
exclude group: 'com.nineoldandroids', module: 'library'
}
compile 'com.android.support:support-v4:27.0.0'
// https://mvnrepository.com/artifact/com.android.support/support-core-ui
compile group: 'com.android.support', name: 'support-core-ui', version: '27.1.1'
compile 'com.android.support:appcompat-v7:27.0.0'
compile 'com.android.support:cardview-v7:27.0.0'
compile 'com.android.support:customtabs:27.0.0'
compile 'com.android.support:multidex:1.0.3'
compile 'com.googlecode.libphonenumber:libphonenumber:8.8.9'
compile 'org.parceler:parceler-api:1.1.5'
compile('com.google.android.gms:play-services-analytics:11.8.0') {
exclude group: 'com.android.support', module: 'support-v4'
}
compile 'com.google.android.gms:play-services-maps:15.0.1'
compile 'com.google.android.gms:play-services-auth:15.0.1'
compile 'com.google.android.gms:play-services-gcm:15.0.1'
compile 'com.google.android.gms:play-services-location:15.0.1'
// compile 'com.google.android.gms:play-services-analytics:11.8.0'
compile 'com.github.hackware1993:MagicIndicator:1.5.0'
compile 'com.roomorama:caldroid:2.3.1'
compile 'com.google.code.gson:gson:2.8.1'
compile 'com.leocardz:aelv:1.1#aar'
compile 'com.flaviofaria:kenburnsview:1.0.7'
compile('com.jakewharton:butterknife:8.4.0') {
exclude module: 'support-compat'
exclude group: 'com.google.android', module: 'support-v4'
}
compile 'com.pixplicity.easyprefs:library:1.8.1#aar'
compile 'de.hdodenhof:circleimageview:2.2.0'
compile 'com.github.jrvansuita:IconHandler:+'
compile 'com.github.mancj:SlideUp-Android:2.2.5'
compile 'com.afollestad:sectioned-recyclerview:0.5.0'
compile 'com.github.bumptech.glide:glide:3.7.0'
compile 'com.facebook.stetho:stetho:1.4.1'
compile 'com.facebook.stetho:stetho-okhttp3:1.4.1'
compile 'com.uphyca:stetho_realm:2.0.0'
compile 'org.greenrobot:eventbus:3.1.1'
compile 'com.birbit:android-priority-jobqueue:2.0.1'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.squareup.retrofit2:converter-scalars:2.1.0'
compile 'com.valdesekamdem.library:md-toast:0.8.0'
compile 'com.facebook.android:account-kit-sdk:4.30.0'
compile 'com.facebook.android:facebook-android-sdk:4.17.0'
compile 'com.wang.avi:library:2.1.3#aar'
compile 'com.afollestad.material-dialogs:core:0.9.6.0'
// compile 'com.onesignal:OneSignal:3.6.5'
compile 'com.onesignal:OneSignal:[3.9.1, 3.99.99]'
compile 'com.kbeanie:image-chooser-library:1.6.0#aar'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.scalified:fab:1.1.3'
compile 'com.github.traex.expandablelayout:library:1.2.2'
compile 'com.github.markomilos:paginate:0.5.1'
compile 'com.wdullaer:materialdatetimepicker:3.3.0'
compile 'com.github.tamir7.contacts:contacts:1.1.7'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0'
compile 'com.github.livechat:chat-window-android:v2.0.0'
compile 'com.uber.sdk:rides-android:0.6.1'
compile 'link.fls:swipestack:0.3.0'
compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
compile 'com.victor:lib:1.0.1'
compile 'com.shamanland:fonticon:0.1.8'
compile 'jp.wasabeef:recyclerview-animators:2.2.7'
compile 'com.squareup.okhttp3:logging-interceptor:3.8.0'
compile 'com.github.vihtarb:tooltip:0.1.9'
compile 'com.daasuu:CountAnimationTextView:0.1.1'
compile 'com.theartofdev.edmodo:android-image-cropper:2.5.1'
compile('com.android.billingclient:billing:1.0') {
exclude module: 'support-compat'
exclude group: 'com.google.android', module: 'support-v4'
}
compile('de.keyboardsurfer.android.widget:crouton:1.8.5#aar') {
// exclusion is not necessary, but generally a good idea.
exclude group: 'com.google.android', module: 'support-v4'
}
compile 'com.nbsp:library:1.8'
apt 'com.jakewharton:butterknife-compiler:8.8.1'
apt 'org.parceler:parceler:1.1.5'
compile 'com.google.guava:guava:19.0'
compile 'org.bouncycastle:bcprov-jdk16:1.46'
}
apply plugin: 'com.google.gms.google-services'
Any suggestions or solutions are very appreciated. Thanks.
I just resolved this problem on my own build server. I updated my repositories block in my build.gradle to have google() as the first entry like below:
allprojects {
repositories {
google()
jcenter()
}
}
Edit: removed a repo that was not needed.
Switch from
jcenter()
google()
to
google()
jcenter()
OK, so that's why:
AAPT2 now on Google's Maven repo: To use AAPT2, you must add Google's Maven repository to your project-level build.gradle, as shown below. Learn more
buildscript.repositories {
google()
jcenter()
...
}
allprojects.repositories {
google()
jcenter()
...
}
I added google() in my build.gradle
buildscript {
repositories {
jcenter()
google()
mavenLocal()
maven { url 'https://maven.google.com' }
}
}
allprojects {
repositories {
jcenter()
google()
mavenLocal()
maven { url 'https://maven.google.com' }
}
}
for me it fixed the problem.
You can try it too.
Check if you are working offline.
File > Settings > Write "offline" on the search bar > Gradle > uncheck "offline work".
Use the keyword "implementation" instead of "compile". Compile is deprecated and will be abandoned by the end of 2018. This is a long shot, but something might have changed since the last Android Studio update.
Explicitly add com.android.support:support-core-ui:27.1.1 to your dependencies.
Let me know if it helped.
Good luck.
Update:
If you go to
https://repo.jfrog.org/artifactory/libs-release-bintray/com/android/support/support-core-ui/27.1.1/
You'll find out that your *.jar file is not there.
There are a couple others, though:
support-core-ui-27.1.1-sources.jar
support-core-ui-27.1.1.aar
support-core-ui-27.1.1.pom
You can use the *.aar file instead.
I had this exact problem, realizing I also updated my gradle to 4.8 between my last successful build and the now broken ones. I downgraded back for 4.7 and my continuous integration builds work again.
So I've been able to solve the problem, but maybe just a workaround so at least my CI build passes. It appears that including this line in my gradle dependencies fixed it:
implementation "com.android.support:support-core-utils:27.1.1"
Also I made sure google() is the first one listed in my top-level gradle repository
when i click on run button then i got this error
Error:org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
Error:org.gradle.internal.resolve.ModuleVersionNotFoundException: Could not find com.android.support:appcompat-v7:27.0.1.
please see below screen shot
and when i try to gradle sync
then i got this problem
please see below screen shot
my build.gradle
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
android {
signingConfigs {
config {
}
}
repositories {
mavenCentral()
}
compileSdkVersion 25
buildToolsVersion '26.0.0'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.hechat"
minSdkVersion 18
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
dexOptions {
javaMaxHeapSize "2048M"
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES.txt'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/notice.txt'
exclude 'META-INF/license.txt'
exclude 'META-INF/dependencies.txt'
exclude 'META-INF/LGPL2.1'
exclude 'project.properties'
exclude 'META-INF/INDEX.LIST'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven { url "https://dl.bintray.com/hani-momanii/maven" }
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
exclude group: 'com.google.code.findbugs'
})
compile('com.twitter.sdk.android:twitter:2.3.1#aar') { transitive = true; }
compile('com.crashlytics.sdk.android:crashlytics:2.6.5#aar') { transitive = true; }
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.theartofdev.edmodo:android-image-cropper:2.3.1'
compile 'com.android.support:appcompat-v7:25.0.0'
compile 'com.android.support:cardview-v7:25.0.0'
compile 'com.android.support:design:25.0.0'
compile 'net.gotev:uploadservice:2.1'
compile 'com.android.support:recyclerview-v7:25.0.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'hani.momanii.supernova_emoji_library:supernova-emoji-library:0.0.2'
compile 'com.google.android.gms:play-services:11.0.4'
compile 'com.google.firebase:firebase-core:10.2.1'
compile 'com.google.code.gson:gson:2.3'
compile 'org.apache.httpcomponents:httpcore:4.3.2'
compile 'org.apache.httpcomponents:httpmime:4.3.3'
compile 'com.mcxiaoke.volley:library:1.0.17'
compile 'com.github.clans:fab:1.6.2'
compile 'org.jsoup:jsoup:1.8.1'
compile 'com.parse.bolts:bolts-tasks:1.4.0'
compile 'com.commit451:PhotoView:1.2.4'
compile 'com.android.support:multidex:1.0.0'
compile 'com.splitwise:tokenautocomplete:1.3.3'
compile 'com.tubb.smrv:swipemenu-recyclerview:5.2.1'
compile 'com.github.bumptech.glide:glide:3.5.2'
compile 'se.emilsjolander:stickylistheaders:2.7.0'
compile 'com.mindorks:placeholderview:0.6.4'
compile 'org.twitter4j:twitter4j-core:4.0.2'
compile 'jp.wasabeef:fresco-processors:2.1.0'
compile 'jp.co.cyberagent.android.gpuimage:gpuimage-library:1.3.0'
compile 'com.google.firebase:firebase-messaging:10.2.1'
compile 'com.android.billingclient:billing:1.0'
testCompile 'junit:junit:4.12'
compile project(':cometchat_platinum-sdk')
}
apply plugin: 'com.google.gms.google-services'
i have not used v-27 then why i am facing v7 issue
thanks in advance
Add allprojects block in your app level build file
1.
allprojects {
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}}}
2.
New projects created using Android Studio 3.0 and higher also include
allprojects {
repositories {
jcenter()
google()
}}
And change your compileSdkVersion to 26 and also buildToolsVersion "26.0.1" then sync your project
Hope this will help you.
Try this i have same problem i solved using below dependencies of Facebook
Use this
compile 'com.facebook.android:facebook-android-sdk:4.26.0'
instead of this
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
There are dependencies that require the entire hierarchy of modules to include the repository.
With Kotlin DSL
build.gradle.kts (Project)
allprojects {
repositories {
// ...
maven(url = "<YOUR-URL>")
}
}
With Groovy
build.gradle (Project)
allprojects {
repositories {
// ...
maven {
url '<YOUR-URL>'
}
}
}
GL
In my case, I was using old plugin so needed to add
jcenter()
After
mavenCentral()
I try to start migrating a Java based multidexed project to Kotlin but I get ClassNotFoundException whenever the app tries to reference a Kotlin class. The weird thing is that the same code sometimes works sometimes it doesn't. There are computers which produce working apk and others don't. Sometimes a rebuild is enough to solve the problem.
I've tried to google it but I've only found this thread, but there is no resolution. Does this thing work properly for everyone else or aren't there any multidexed Kotlin project yet?
I've tried with AS 2.3.3 and AS 3.0.0-beta6, 2.3.3 android plugun, kotoin version 1.1.50, without proguard.
buildscript {
ext.kotlin_version = '1.1.50'
ext.android_plugin_version = '2.3.3'
ext.support_lib_version = '25.3.1'
ext.play_services_version = '11.0.4'
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
dependencies {
classpath "com.android.tools.build:gradle:$android_plugin_version"
classpath 'me.tatarka:gradle-retrolambda:3.2.5'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
classpath 'com.google.gms:google-services:3.0.0'
classpath 'com.google.firebase:firebase-plugins:1.1.1'
}
}
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
apply plugin: "com.android.application"
apply plugin: "me.tatarka.retrolambda"
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: "com.google.firebase.firebase-perf"
repositories {
mavenCentral()
jcenter()
maven {
url "https://jitpack.io"
}
}
android {
signingConfigs {
debug {
...
}
}
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.my.app"
signingConfig signingConfigs.debug
minSdkVersion 14
targetSdkVersion 25
versionCode 13
versionName "2.0.1.b8face5"
vectorDrawables.useSupportLibrary = true
multiDexEnabled true
testInstrumentationRunner "com.my.app.TestRunner"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
//this is because instabug uses rxjava 1 and now we have both 1 and 2 on the classpath
packagingOptions {
exclude "META-INF/rxjava.properties"
}
buildTypes {
debug {
applicationIdSuffix ".debug"
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
release {
}
}
}
dependencies {
compile fileTree(include: "*.jar", dir: "libs")
// Force usage of support annotations in the test app, since it is internally used by the runner module.
androidTestCompile("com.android.support.test.espresso:espresso-core:2.2.1") {
exclude module: "support-annotations"
}
androidTestCompile("com.android.support.test.espresso:espresso-contrib:2.2.1") {
// Necessary to avoid version conflicts
exclude group: "com.android.support", module: "appcompat"
exclude group: "com.android.support", module: "support-v4"
exclude group: "com.android.support", module: "support-annotations"
exclude module: "recyclerview-v7"
}
compile "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version"
compile "com.android.support:appcompat-v7:$support_lib_version"
compile "com.android.support:recyclerview-v7:$support_lib_version"
compile "com.android.support:design:$support_lib_version"
compile "com.android.support:cardview-v7:$support_lib_version"
compile "com.google.android.gms:play-services-auth:$play_services_version"
compile "com.google.android.gms:play-services-identity:$play_services_version"
compile "com.google.android.gms:play-services-location:$play_services_version"
compile "com.google.android.gms:play-services-maps:$play_services_version"
compile "com.google.firebase:firebase-core:$play_services_version"
compile "com.google.firebase:firebase-crash:$play_services_version"
compile "com.google.firebase:firebase-perf:$play_services_version"
compile "com.google.code.gson:gson:2.8.1"
compile "com.google.maps.android:android-maps-utils:0.4"
compile "com.squareup.retrofit2:retrofit:2.3.0"
compile "com.squareup.retrofit2:converter-gson:2.3.0"
compile "com.squareup.retrofit2:adapter-rxjava2:2.3.0"
compile "io.reactivex.rxjava2:rxandroid:2.0.1"
compile "io.reactivex.rxjava2:rxjava:2.1.3"
compile "com.squareup.okhttp3:okhttp-urlconnection:3.8.1"
compile "com.facebook.stetho:stetho:1.5.0"
compile "com.facebook.stetho:stetho-okhttp3:1.5.0"
compile "com.squareup.picasso:picasso:2.5.2"
compile "com.jakewharton:butterknife:8.2.1"
compile "com.annimon:stream:1.1.8"
compile "com.github.lawloretienne:quickreturn:0.0.1"
compile "com.github.chrisbanes:PhotoView:1.2.6"
compile "fr.baloomba:viewpagerindicator:2.4.2"
compile "com.github.bluejamesbond:textjustify-android:2.1.6"
compile "com.turingtechnologies.materialscrollbar:lib:10.1.4"
compile "com.github.PhilJay:MPAndroidChart:v3.0.1"
compile "com.android.support:multidex:1.0.1"
compile "com.bugsnag:bugsnag-android:3.9.0"
//TODO check periodically whether they upgraded to rxjava 2
compile "com.instabug.library:instabug:4.2.11"
testCompile "junit:junit:4.12"
androidTestCompile "com.android.support:support-annotations:$support_lib_version"
androidTestCompile "com.android.support.test:runner:0.5"
androidTestCompile "com.android.support.test:rules:0.5"
annotationProcessor "com.jakewharton:butterknife-compiler:8.2.1"
compile "com.google.dagger:dagger:2.5"
annotationProcessor "com.google.dagger:dagger-compiler:2.5"
provided "javax.annotation:jsr250-api:1.0"
}
apply plugin: "com.google.gms.google-services"
Finally I was able to solve the issue! The exception was caused by a RetroLambda bug and thankfully disappeared after I updated to 3.7.0. The build was nondeterministic because it seems gradle clean doesn't delete everything. After I manually deleted the build folder both in the app and root module, the results became deterministic.
If you are using Java 8 then you should also use Kotlin jre8.
compile "org.jetbrains.kotlin:kotlin-stdlib-jre8:$kotlin_version"
Actually few hours ago my project has no error, but I don't know what changes happened from me unknowingly and now I'm getting following error--
"Error:(36, 0) Project with path ':easyAndroidAnimationsLibrary' could not be found in root project 'wikiReviews'". I googled and checked for my project hierarchy, gradle file, setting file everything seems to be OK but unable to trace the real problem yet. Please see the following image to check hierarchy--
My build.gradle is--
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.3'
defaultConfig {
applicationId "com.myleomo.wikiReviews"
minSdkVersion 15
targetSdkVersion 23
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
}
}
packagingOptions {
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
compile project(':easyAndroidAnimationsLibrary')
compile project(':liveSdk')
compile project(':main')
compile project(':zbarSample')
compile project(':stickyHeaderLibrary')
compile project(':starBar')
compile project(':facebookSDK')
compile project(':library')
compile project(':ffmpeg4android_lib')
compile project(':socialNetworkingLib')
compile 'com.google.android.gms:play-services:9.6.1'
compile files('libs/nmdp_speech_kit.jar')
compile files('libs/AndroidSwipeLayout-v1.1.8.jar')
compile group: 'commons-logging', name: 'commons-logging', version: '1.2'
compile files('libs/CWAC-SackOfViewsAdapter.jar')
compile files('libs/devsmartandroid.jar')
compile group: 'com.google.api-client', name: 'google-api-client', version: '1.6.0-beta'
compile files('libs/google-api-services--v1-1.3.0-beta.jar')
compile files('libs/httpclient-4.4.jar')
compile group: 'oauth.signpost', name: 'signpost-commonshttp4', version: '1.2'
compile group: 'oauth.signpost', name: 'signpost-core', version: '1.2.1.2'
compile group: 'oauth.signpost', name: 'signpost-jetty6', version: '1.2.1.1'
compile 'com.android.support:multidex:1.0.0'
'4.4-alpha1'
compile 'com.squareup.picasso:picasso:2.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'org.apache.httpcomponents:httpclient:4.5'
compile 'org.apache.httpcomponents:httpcore:4.4.1'
compile 'org.apache.httpcomponents:httpmime:4.3.5'
version: '4.3.5.1'
compile('org.apache.httpcomponents:httpmime:4.3')
{
exclude module: "httpclient"
}
}
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
repositories {
jcenter()
}
}
allprojects {
repositories {
jcenter()
}
}
Below is my top level build. gradle--
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.5.0'
}
}
allprojects {
repositories {
jcenter()
}
}
Below is my settings.gradle--
include ':easyAndroidAnimationsLibrary'
include ':facebookSDK'
include ':liveSdk'
include ':socialNetworkingLib'
include ':starBar'
include ':stickyHeaderLibrary'
include ':zbarSample'
include ':ffmpeg4android_lib'
include ':library'
include ':main'
include ':wikiReviews'
Please let me know if I can provide more information for the same. Thank you.
your project should be wikiReviews.
I guess the way of your project loaded from android studio maybe wrong