Monday, 15 February 2010

Android Studio cannot resolve symbols from imported AAR module -


All answers from the same questions manually talk about graadel files but I have to import and build an AR file. Gradle has used Android studios to check files and all of these look correct.

My problem is:

failed import < / P>

I have imported ShowCaseView v5.0.0 R but when I try to import classes in my tutorial. Java file (you can see in red) Android studio does not recognize classrooms Android Studio recognizes that there is only one com.github.amlcurran.showcaseview.R .

I have also tried to clean up & amp; Project reconstruction, and shutdown & amp; Reopen Android Studio but it does not help.

PS As that ignore the missing XML file before I was copying them into the project

Gradle Files

ShowCaseView-5.0.0> build.gradle:

< Pre> configurations.create ("default") artifacts.add ("default", file ('ShowCaseView-5.0.0.aar'))

build my application. gradle:

  plugin apply: 'com.android.application' Android {compileSdkVersion 21 buildToolsVersion "21.1.2" defaultConfig {applicationId "com.giraffeweather" minSdkVersion 19 targetSdkVersion 21 versionCode 1 versionName " 1.0 "} {buildTypes release {minifyEnabled false proguardFiles getDefaultProguardFile ('ProGuard-android.txt'), 'proguard- Rules.pro '}}} {Dependency compile FileTree (dir:' libs ', includes: [' * .jar ']) Compile' com. Android Support: App-Comt-V 7: 21.0.3 "compiled project ( ': ShowCaseView-5.0.0')}  

build.grad Le of Android Studio project:

  // Top-level build file where you can add general configuration options for all sub-projects / modules. Buildscript {repositories {jcenter ()} dependency {classpath 'com.android.tools.build:gradle:1.1.0' // NOTE: Do not keep your application dependencies here; They are related files}} {allprojects treasures {jcenter (}}}  

Gradle settings file settings.gradle build.gradle in personal module //:

  Include: App ',': ShowCaseView-5.0.0 ' 

I almost zero People know who import AAR files in this way, and I do not know that it works properly. Your results show that this is not so.

Switch to pull Jesitr the Bintre the library:

Step # 1: Change compilation project ( ': ShowCaseView-5.0.0') With compile 'com.github.amlcurran.showcaseview: library: 5.0.0'

step # 2: delete , ': ShowCaseView-5.0.0' / Code> to settings.gradle

Step # 3: Delete ShowCaseView-5.0.0 directory


No comments:

Post a Comment