I have a problem with an old project that was developed in IntelliJ without Gradle. I wanted to port it to Android Studio and Gradle, but I have a lot of problems. Since the project was quite old, the old version of Google Play Services was used. In Intellij, I just added the libproject of the old gps to the dependencies (google_play_services_5089000_r19) and everything worked fine. In Android Studio, I was able to add other libraries by adding them as a library module and adding compile project(':segmentedradios') as a gradle dependency, but I just can't do the work with the gps library. I tried to add it as a module, but Android Studio says that “no module is selected” after specifying the libroject library directory. I also tried adding it as a gradle dependency, but I keep getting errors like this:
error: package com.google.android.gcm does not exist error: package com.google.android.maps does not exist error: cannot find symbol variable GCMRegistrar
Despite the fact that I tried ~ 10 different solutions, the project still does not work. How to fix it?
Gradle:
apply plugin: 'com.android.application' android { compileSdkVersion "Google Inc.:Google APIs:18" buildToolsVersion "21.1.2" defaultConfig { applicationId "my_package.app_name" minSdkVersion 14 targetSdkVersion 18 } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' } } } dependencies { compile 'com.android.support:support-v4:18.0.0' compile files('libs/libGoogleAnalyticsV2.jar') compile project(':segmentedradios') compile 'com.google.android.gms:play-services:5.0.89' }
source share