apla / me.apla.cordova.app-preferences

App preferences plugin for cordova
Apache License 2.0
201 stars 210 forks source link

Error building on Android #81

Closed Zorgatone closed 7 years ago

Zorgatone commented 8 years ago
ionic run --device android
Running command: /Users/webdev1/repos/B-View/hooks/after_prepare/010_add_platform_class.js /Users/webdev1/repos/B-View
add to body class: platform-android
will push strings array {"name":"lang","titles":["English (US)","English (UK)"],"values":["en-us","en-gb"]}
android preferences file was successfully generated
Running command: /Users/webdev1/repos/B-View/platforms/android/cordova/run --device
ANDROID_HOME=/Users/webdev1/Library/Android/sdk
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home
Running: /Users/webdev1/repos/B-View/platforms/android/gradlew cdvBuildDebug -b /Users/webdev1/repos/B-View/platforms/android/build.gradle -PcdvBuildArch=arm -Dorg.gradle.daemon=true
:preBuild
:compileDebugNdk UP-TO-DATE
:preDebugBuild
:checkDebugManifest
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:preBuild
:CordovaLib:preDebugBuild
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:compileDebugJava UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:packageDebugJar UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:packageDebugJniLibs UP-TO-DATE
:CordovaLib:packageDebugLocalJar UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:prepareAndroidCordovaLibUnspecifiedDebugLibrary UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources UP-TO-DATE
:generateDebugSources UP-TO-DATE
:compileDebugJava/Users/webdev1/repos/B-View/platforms/android/src/me/apla/cordova/AppPreferencesActivity.java:3: error: package it.bitronvideo.bsee does not exist
import it.bitronvideo.bsee.R;
                          ^
/Users/webdev1/repos/B-View/platforms/android/src/me/apla/cordova/AppPreferencesActivity.java:27: error: package R does not exist
            addPreferencesFromResource(R.xml.apppreferences);
                                        ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileDebugJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 9.451 secs

/Users/webdev1/repos/B-View/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                    ^
Error code 1 for command: /Users/webdev1/repos/B-View/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/webdev1/repos/B-View/platforms/android/build.gradle,-PcdvBuildArch=arm,-Dorg.gradle.daemon=true
ERROR running one or more of the platforms: Error: /Users/webdev1/repos/B-View/platforms/android/cordova/run: Command failed with exit code 1
You may not have the required environment or OS to run this project
apla commented 8 years ago

Hi, I'm not an android developer, so basically I cannot help you with that error—test projects pass CI successfully. Maybe something is wrong with your app configuration. You can try to remove, then add android platform and check if problem persists.

shankari commented 7 years ago

R is autogenerated by the android sdk. If that doesn't work, there's something wrong with your android setup.

apla commented 7 years ago

Further discussion goes to #87