I am trying to work with the DistanceBeaconActivity but “import com.estimote.examples.demos.R” causes an error.
“R” seems to be important to many activities and adapters. How do I resolve this reference?
Thanks,
Rainer
I am trying to work with the DistanceBeaconActivity but “import com.estimote.examples.demos.R” causes an error.
“R” seems to be important to many activities and adapters. How do I resolve this reference?
Thanks,
Rainer
“R” is the class that contains all the resources:
http://developer.android.com/guide/topics/resources/accessing-resources.html
It should be there automatically. What version of Android Studio are you on?
1.51 … on a Mac
Any .gradle or manifest files I should check?
There’s been precedence for this error: http://stackoverflow.com/questions/885009/r-cannot-be-resolved-android-error
I am using Android Studio though.
I copied the folder com.estimote.examples.demos over to my project directory to play around with things. All other imports work fine.
this my gradle.build file:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion "23.0.1"
defaultConfig {
applicationId "com.example.zzz.locationtest"
minSdkVersion 18
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.estimote:sdk:0.10.0@aar'
}
Did you only copy the “src” files? For resources, you’ll also need to copy stuff from the “res” folder I guess. And you might have to change “com.estimote.exaples.demos” into your own package name.