We have guidelines for integrating DroidAR in an Eclipse project provided at this link: DroidAR Mobile Augmented Reality - How to use the framework in your own application but I am struggling with setting up DroidAR in an AndroidStudio project.
The steps which I followed are:
It is showing 120 compilation errors, few errors specified below:
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027android:Widget.Material.Spinner.Underlined\u0027.","sources":[{"file":"/Users/devarshi.k/Downloads/DroidArSample/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.0/res/values-ldltr-v21/values-ldltr-v21.xml","position":{"startLine":1}}],"original":""}
AGPBI: {"kind":"error","text":"Error retrieving parent for item: No resource found that matches the given name \u0027android:Widget.Material.Spinner.Underlined\u0027.","sources":[{"file":"/Users/devarshi.k/Downloads/DroidArSample/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.0/res/values-ldrtl-v23/values-ldrtl-v23.xml","position":{"startLine":1}}],"original":""}
AGPBI: {"kind":"error","text":"No resource found that matches the given name: attr \u0027android:textAlignment\u0027.","sources":[{"file":"/Users/devarshi.k/Downloads/DroidArSample/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.1.0/res/values-v17/values-v17.xml","position":{"startLine":5,"startColumn":20,"startOffset":407,"endColumn":41,"endOffset":428}}],"original":""}
Final FAILED message is:
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/devarshi.k/Library/Android/sdk/build-tools/22.0.1/aapt'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Any ideas?
Check your build.gradle
file for mismatch of versions between the following:
compileSdkVersion
buildToolsVersion
targetSdkVersion
compile 'com.android.support:appcompat-v7:23.0.0'
It is recommended to set all of them to the same version to avoid issues like mentioned in your question.
E.g. If you go with API Level-23 your configuration in build.gradle
should be as seen below:
(in the respective places each of the following is declared)
compileSdkVersion 23
buildToolsVersion "23.0.0"
targetSdkVersion 23
compile 'com.android.support:appcompat-v7:23.0.0'
Refererence
i downloaded your project from GitHub and edited the build.gradle in this way:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
...
defaultConfig {
applicationId "daemonconstruction.droidarsample"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
dependencies {
...
compile 'com.android.support:appcompat-v7:22.+'
...
}
}
Sync, rebuild the project and it works.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With