The number of method references in a .dex file cannot exceed 64k API 17

I am building an app with SugarORM Library but when I try to build the project for API 17 (didn’t check for others) it shows build error. Information:Gradle tasks [:app:assembleDebug] :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAnimatedVectorDrawable2330Library UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72330Library UP-TO-DATE :app:prepareComAndroidSupportCardviewV72330Library UP-TO-DATE :app:prepareComAndroidSupportDesign2330Library UP-TO-DATE :app:prepareComAndroidSupportMediarouterV72300Library UP-TO-DATE :app:prepareComAndroidSupportRecyclerviewV72330Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42330Library UP-TO-DATE :app:prepareComAndroidSupportSupportVectorDrawable2330Library UP-TO-DATE :app:prepareComAndroidVolleyVolley100Library UP-TO-DATE … Read more

Android Studio suddenly cannot resolve symbols

Android Studio 0.4.2 was working fine and today I opened it and almost everything was red and the auto-completion had stopped working. I look at the imports and AS seems to be telling me it can’t find android.support.v4 all of a sudden (offering me the option to remove the unused imports). (android.support.v7 seems to be … Read more

Could not find com.google.android.gms:play-services:3.1.59 3.2.25 4.0.30 4.1.32 4.2.40 4.2.42 4.3.23 4.4.52 5.0.77 5.0.89 5.2.08 6.1.11 6.1.71 6.5.87

referencing the play-services via gradle stopped working for me – boiled it down – even the sample I used as a reference in the first place stopped working: https://plus.google.com/+AndroidDevelopers/posts/4Yhpn6p9icf FAILURE: Build failed with an exception. * What went wrong: A problem occurred configuring project ‘:auth’. > Failed to notify project evaluation listener. > Could not … Read more

Gradle tasks are not showing in the gradle tool window in Android Studio 4.2

I just updated Android Studio to version 4.2. I was surprised to not see the Gradle tasks in my project. In the previous version, 4.1.3, I could see the tasks as shown here: But now I only see the dependencies in version 4.2: I tried to clear Android Studio’s cache and sync my project again, … Read more

How do I activate a Spring Boot profile when running from IntelliJ?

I have 5 environments: – local (my development machine) – dev – qc – uat – live – staging I want different application properties to be used for each environment, so I have the following properties files each which have a different URL for the datasource: – application.properties (containing common properties) – application-local.properties – application-dev.properties … Read more

Cannot resolve symbol ‘AppCompatActivity’

I’ve just tried to use Android Studio. I’ve created blank project and tried to create Activity which extends AppCompatActivity. Unfortunalty Android Studio “says” that it Cannot resolve symbol ‘AppCompatActivity’ I have compile “com.android.support:appcompat-v7:22.0.+” in dependency list of my “app” module and rebuilt project several times. However I can only use ActionBarActivity. What am I doing … Read more

How/when to generate Gradle wrapper files?

I am trying to understand how the Gradle Wrapper works. In many source repos, I see the following structure: projectRoot/ src/ build.gradle gradle.properties settings.gradle gradlew gradlew.bat gradle/ wrapper/ gradle-wrapper.jar gradle-wrapper.properties My questions: How/when does one generate gradlew/gradlew.bat? Are you supposed to generate them only one time when the project is first created, do you generate … Read more