I just created a simple mobile app with meteor (& cordova) and I want to test it now in Android. With iOS I had absolute no problems while building to device and emulator. But Im experimenting since days a problem and I coudlt find a solution (maybe important to say that Im REALLY new to Android Studio).
The problem is basically that for some reason, the meteor app starts and the emulator as well… but suddenly the app stops and I get the following error(s)
meteor run android
=> Started your app.
=> App running at: http://localhost:3000/
=> Errors executing Cordova commands:
While running Cordova app for platform Android with options --emulator:
Error: Command failed:
/Users/pathtoApp/.meteor/local/cordova-build/platforms/android/cordova/run --emulator
/Users/pathtoApp/.meteor/local/cordova-build/platforms/android/build/intermediates/res/merge
d/debug/values-v24/values-v24.xml:3:
AAPT: Error retrieving parent for item: No resource found that matches the given name
'android:TextAppearance.Material.Widget.Button.Borderless.Colored'.
/Users/pathtoApp/.meteor/local/cordova-build/platforms/android/build/intermediates/res/merge
d/debug/values-v24/values-v24.xml:4:
AAPT: Error retrieving parent for item: No resource found that matches the given name
'android:TextAppearance.Material.Widget.Button.Colored'.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command
'/Users/user/Library/Android/sdk/build-tools/23.0.2/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.
{ [Error: /Users/pathtoApp/.meteor/local/cordova-build/platforms/android/gradlew: Command
failed with exit code 1 Error output:
After searching for help I saw that the problem could be related with the compileSdkVersion
and the buildToolsVersion
that should be at the ssame version. But this doesnt help.
Im using API 23 since Cordova supports it.
Here are my build graddles.
Module: app
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '23.0.2'
defaultConfig {
applicationId "com.example.exampleapp.idk"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
debug {
debuggable true
}
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:multidex:1.0.1'
compile 'com.android.support:appcompat-v7:23.1.1'
compile 'com.android.support:recyclerview-v7:23.1.1'
compile 'com.android.support:cardview-v7:23.1.1'
testCompile 'junit:junit:4.12'
}
Project:IDK
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
As I said I have no idea whats going wrong since im completely new at android studio, Im probably having some compatibility issues ?
Maybe is important to say : Build for ios and ios-device works perfectly.
Meteor 1.4.2.7
Thanks in advance for the help.