@borisisaic I am.
You can still do these two things:
Do this outside the current project you are working on, it won’t change your project in any way. After you can delete these folders again.
@borisisaic I am.
You can still do these two things:
Do this outside the current project you are working on, it won’t change your project in any way. After you can delete these folders again.
@yoojene Interesting.
Your environment info is different: Cordova, app-scripts, cordova-android and even Android SDK tools are all older for you, your npm is even ancient. If this were a normal case I would tell you to update all of this to make sure that not a bug that was already fixed is causing this.
Can you please post the complete output with the error you are getting?
It is using ionic webview and the project with error is using Crosswalk webview
<plugin name="cordova-plugin-ionic-webview" spec="^1.1.11" />
Created a new project with ionic start and it is working, here my info:
ionic info
cli packages: (C:\Users\leonardo.santos\AppData\Roaming\npm\node_modules)
@ionic/cli-utils : 1.15.1
ionic (Ionic CLI) : 3.15.1
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
@ionic/app-scripts : 3.0.1
Cordova Platforms : android 6.2.3
Ionic Framework : ionic-angular 3.7.1
System:
Node : v6.11.3
npm : 3.10.10
OS : Windows 8.1
Environment Variables:
ANDROID_HOME : not set
Misc:
backend : legacy
@leonardoss Strange. The only difference is a newer Ionic CLI and cli-utils really.
Is this the same computer?
This is the full error
activity#com.urbanairship.cordova.CustomLandingPageActivity was tagged at AndroidManifest.xml:72 to replace another declaration but no other declaration present
:processArmv7DebugResources
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processArmv7DebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* 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: 26.079 secs
Error: /Users/Eugene/Development/Repos/Pfizer/newton-miguia/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processArmv7DebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[ERROR] An error occurred while running cordova build android (exit code 1).
Not sure if I need to update all my dependencies as I’ve created a new fresh Ionic side menu project with no plugins, added Android platform and this builds fine, on same machine
Same computer, take a look again, in the project with error I am using Crosswalk and the project created with ionic start is using ionic-webview, I don’t know if this is a relevant information but can help
Possibly related? https://twitter.com/jcesarmobile/status/923312847970619393
Not this problem in particular as no one reports having installed new Android Studio. Problems there are also different.
Probably something with dynamically loaded Gradle, Android SDK 27 things…
Thanks, can you post the whole command output, not just the error part? We need more context
Sorry here you go:
Eugenes-MacBook-Pro:newton-miguia Eugene$ ionic cordova build android --prod
Running app-scripts build: --prod --platform android --target cordova
[13:59:06] build prod started ...
[13:59:06] clean started ...
[13:59:06] clean finished in 7 ms
[13:59:06] copy started ...
[13:59:06] ngc started ...
Warning: Can't resolve all parameters for WebAudioTrack in /Users/Eugene/Development/Repos/Pfizer/newton-miguia/node_modules/ionic-audio/dist/ionic-audio-web-track.d.ts: (?, ?). This will become an error in Angular v5.x
Warning: Can't resolve all parameters for CordovaAudioTrack in /Users/Eugene/Development/Repos/Pfizer/newton-miguia/node_modules/ionic-audio/dist/ionic-audio-cordova-track.d.ts: (?). This will become an error in Angular v5.x
[13:59:22] ngc finished in 16.41 s
[13:59:22] preprocess started ...
[13:59:22] deeplinks started ...
[13:59:24] deeplinks finished in 1.55 s
[13:59:24] optimization started ...
[13:59:53] optimization finished in 29.36 s
[13:59:53] preprocess finished in 30.91 s
[13:59:53] webpack started ...
[13:59:53] copy finished in 47.48 s
[14:02:10] webpack finished in 136.59 s
[14:02:10] sass started ...
[14:02:10] uglifyjs started ...
[14:02:12] autoprefixer: <css input>:32897:3: Gradient has outdated direction syntax. New syntax is like `to left`
instead of `right`.
[14:02:12] autoprefixer: <css input>:33082:3: Gradient has outdated direction syntax. New syntax is like `to left`
instead of `right`.
[14:02:13] sass finished in 2.60 s
[14:02:13] cleancss started ...
[14:02:16] cleancss finished in 3.27 s
[14:02:47] uglifyjs finished in 37.11 s
[14:02:47] postprocess started ...
[14:02:47] removed unused font files
[14:02:47] postprocess finished in 103 ms
[14:02:47] lint started ...
[14:02:47] build prod finished in 221.22 s
> cordova build android
Processing settings for platform: android
Processing settings for platform: ios
Wrote iOS Plist: /Users/Eugene/Development/Repos/Pfizer/newton-miguia/platforms/ios/Mi Guia/Mi Guia-Info.plist
Discovered plugin "cordova-plugin-streaming-media" in config.xml. Adding it to the project
Fetching plugin "cordova-plugin-streaming-media@^1.0.2" via npm
Plugin "com.hutchind.cordova.plugins.streamingmedia" already installed on android.
Plugin "com.hutchind.cordova.plugins.streamingmedia" already installed on ios.
ANDROID_HOME=/usr/local/Cellar/android-sdk/24.4.1_1
JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home
Subproject Path: CordovaLib
Could not find implementations for the following rules specified in the configuration:
comma-dangle
Try upgrading TSLint and/or ensuring that you have all necessary custom rules installed.
If TSLint was recently upgraded, you may have old rules configured which need to be cleaned up.
null
org.xwalk:xwalk_core_library:23+
Incremental java compilation is an incubating feature.
:preBuild
UP-TO-DATE
:preArmv7DebugBuild
UP-TO-DATE
:checkArmv7DebugManifest
:preArmv7ReleaseBuild UP-TO-DATE
:preX86DebugBuild
UP-TO-DATE
:preX86ReleaseBuild
UP-TO-DATE
:CordovaLib:preBuild
UP-TO-DATE
:CordovaLib:preDebugBuild
UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl
:CordovaLib:compileDebugNdk
UP-TO-DATE
:CordovaLib:compileLint
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugShaders
:CordovaLib:compileDebugShaders
:CordovaLib:generateDebugAssets
:CordovaLib:mergeDebugAssets
:CordovaLib:mergeDebugProguardFiles
:CordovaLib:packageDebugRenderscript
UP-TO-DATE
:CordovaLib:compileDebugRenderscript
:CordovaLib:generateDebugResValues
:CordovaLib:generateDebugResources
:CordovaLib:packageDebugResources
:CordovaLib:processDebugManifest
:CordovaLib:generateDebugBuildConfig
:CordovaLib:processDebugResources
:CordovaLib:generateDebugSources
:CordovaLib:incrementalDebugJavaCompilationSafeguard
:CordovaLib:compileDebugJavaWithJavac
:CordovaLib:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:processDebugJavaRes
UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug
:CordovaLib:mergeDebugJniLibFolders
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug
:CordovaLib:bundleDebug
:CordovaLib:preReleaseBuild UP-TO-DATE
:CordovaLib:checkReleaseManifest
:CordovaLib:prepareReleaseDependencies
:CordovaLib:compileReleaseAidl
:CordovaLib:compileReleaseNdk
UP-TO-DATE
:CordovaLib:copyReleaseLint
UP-TO-DATE
:CordovaLib:mergeReleaseShaders
:CordovaLib:compileReleaseShaders
:CordovaLib:generateReleaseAssets
:CordovaLib:mergeReleaseAssets
:CordovaLib:mergeReleaseProguardFiles
:CordovaLib:packageReleaseRenderscript
UP-TO-DATE
:CordovaLib:compileReleaseRenderscript
:CordovaLib:generateReleaseResValues
:CordovaLib:generateReleaseResources
:CordovaLib:packageReleaseResources
:CordovaLib:processReleaseManifest
:CordovaLib:generateReleaseBuildConfig
:CordovaLib:processReleaseResources
:CordovaLib:generateReleaseSources
:CordovaLib:incrementalReleaseJavaCompilationSafeguard
:CordovaLib:compileReleaseJavaWithJavac
:CordovaLib:compileReleaseJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
:CordovaLib:processReleaseJavaRes
UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForRelease
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForRelease
:CordovaLib:mergeReleaseJniLibFolders
:CordovaLib:transformNative_libsWithMergeJniLibsForRelease
:CordovaLib:transformNative_libsWithSyncJniLibsForRelease
:CordovaLib:bundleRelease
:prepareAndroidArchLifecycleRuntime100Library
:prepareAndroidCordovaLibUnspecifiedDebugLibrary
:prepareComAndroidSupportAnimatedVectorDrawable2531Library
:prepareComAndroidSupportAppcompatV72531Library
:prepareComAndroidSupportCardviewV72531Library
:prepareComAndroidSupportSupportCompat2700Library
:prepareComAndroidSupportSupportCoreUi2700Library
:prepareComAndroidSupportSupportCoreUtils2700Library
:prepareComAndroidSupportSupportFragment2700Library
:prepareComAndroidSupportSupportMediaCompat2700Library
:prepareComAndroidSupportSupportV42700Library
:prepareComAndroidSupportSupportVectorDrawable2531Library
:prepareComGoogleAndroidGmsPlayServicesAnalytics1142Library
:prepareComGoogleAndroidGmsPlayServicesAnalyticsImpl1142Library
:prepareComGoogleAndroidGmsPlayServicesAnalyticsImplLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesAnalyticsLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesBase1142Library
:prepareComGoogleAndroidGmsPlayServicesBaseLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesBasement1142Library
:prepareComGoogleAndroidGmsPlayServicesBasementLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesGcm1142Library
:prepareComGoogleAndroidGmsPlayServicesGcmLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesIid1142Library
:prepareComGoogleAndroidGmsPlayServicesIidLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesLocation1142Library
:prepareComGoogleAndroidGmsPlayServicesLocationLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4Impl1142Library
:prepareComGoogleAndroidGmsPlayServicesTagmanagerV4ImplLicense1142Library
:prepareComGoogleAndroidGmsPlayServicesTasks1142Library
:prepareComGoogleAndroidGmsPlayServicesTasksLicense1142Library
:prepareComUrbanairshipAndroidUrbanairshipSdk882Library
:prepareOrgXwalkXwalk_core_library23535894Library
:prepareArmv7DebugDependencies
:compileArmv7DebugAidl
:compileArmv7DebugRenderscript
:generateArmv7DebugBuildConfig
:mergeArmv7DebugShaders
:compileArmv7DebugShaders
:generateArmv7DebugAssets
:mergeArmv7DebugAssets
:createXwalkCommandLineFileArmv7Debug
:generateArmv7DebugResValues
:generateArmv7DebugResources
:mergeArmv7DebugResources
:processArmv7DebugManifest
/Users/Eugene/Development/Repos/Pfizer/newton-miguia/platforms/android/AndroidManifest.xml:72:9-82:20 Warning:
activity#com.urbanairship.cordova.CustomLandingPageActivity was tagged at AndroidManifest.xml:72 to replace another declaration but no other declaration present
:processArmv7DebugResources
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight
FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processArmv7DebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* 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: 26.079 secs
Error: /Users/Eugene/Development/Repos/Pfizer/newton-miguia/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processArmv7DebugResources'.
> com.android.ide.common.process.ProcessException: Failed to execute aapt
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
[ERROR] An error occurred while running cordova build android (exit code 1).
Eugenes-MacBook-Pro:newton-miguia Eugene$
Are you all using Crosswalk in the projects that can’t build any more?
(Simple reply with “Yes” or “No” would be important)
How can I determine this?
Yes, I am. Trying to remove modules and remove Crosswalk to check if this solve the problem.
You would have a plugin cordova-plugin-crosswalk-webview
(or similar) in use.
Yes Crosswalk is in this project. But I also added the cordova-plugin-crosswalk-webview
to a fresh project and that built OK
Can you guys provide a list of plugins you guys using? I am starting to think that is a problem in some particular plugin, because this error is not reproduced in a fresh installation.
In my case are:
<plugin name="com-sarriaroman-photoviewer" spec="^1.1.10" />
<plugin name="com.synconset.imagepicker" spec="^2.1.10">
<variable name="PHOTO_LIBRARY_USAGE_DESCRIPTION" value="Precisamos acessar suas fotos para coletar o documento." />
</plugin>
<plugin name="cordova-plugin-camera-preview" spec="0.9.0">
<variable name="CAMERA_USAGE_DESCRIPTION" value="Precisamos acessar para a selfie e a coleta de documentos." />
</plugin>
<plugin name="cordova-plugin-crop" spec="0.4.0" />
<plugin name="cordova-plugin-device" spec="^1.1.4" />
<plugin name="cordova-plugin-file" spec="^4.3.3" />
<plugin name="cordova-plugin-geolocation" spec="^2.4.3" />
<plugin name="cordova-plugin-inappbrowser" spec="^1.7.1" />
<plugin name="cordova-plugin-screen-orientation" spec="2.0.2-dev" />
<plugin name="cordova-plugin-sim" spec="^1.3.3" />
<plugin name="cordova-plugin-splashscreen" spec="^4.0.3" />
<plugin name="cordova-plugin-statusbar" spec="^2.2.3" />
<plugin name="cordova-plugin-vibration" spec="^2.1.5" />
<plugin name="cordova-plugin-whitelist" spec="^1.3.1" />
<plugin name="ionic-plugin-keyboard" spec="^2.2.1" />
<plugin name="onesignal-cordova-plugin" spec="^2.2.0" />
$ ionic info
cli packages: (/usr/local/lib/node_modules)
@ionic/cli-utils : 1.15.1
ionic (Ionic CLI) : 3.15.1
global packages:
cordova (Cordova CLI) : 7.1.0
local packages:
@ionic/app-scripts : 3.0.1
Cordova Platforms : android 6.3.0
Ionic Framework : ionic-angular 3.7.1
System:
Android SDK Tools : 25.2.5
ios-deploy : 2.0.0
ios-sim : 6.0.0
Node : v8.6.0
npm : 5.3.0
OS : macOS High Sierra
Xcode : Xcode 9.1 Build version 9B37
Environment Variables:
ANDROID_HOME : /Users/mhartington/Library/Android/sdk
Misc:
backend : pro
So i was able to start a new project and with the default plugins + crosswalk, was able to build without an issue.
I think @leonardoss could be on to something as these errors:
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:font
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontStyle
ERROR: In <declare-styleable> FontFamilyFont, unable to find attribute android:fontWeight
Are not reproducible in fresh app
This seem to be from the android studio 3.0 update/release.
Until cordova-android 6.4.0 is out, I suggest everyone downgrade the android studio version to something before 3.0
Same for me!
I downgraded ionic to 3.15.0 but same error.
cli packages: (/Volumes/iMatt HD/develop/mobile/ionic/upel/node_modules)
@ionic/cli-utils : 1.15.0
ionic (Ionic CLI) : 3.15.0
global packages:
cordova (Cordova CLI) : 7.0.1
local packages:
@ionic/app-scripts : 2.1.4
Cordova Platforms : android 6.2.3 ios 4.4.0
Ionic Framework : ionic-angular 3.6.1
System:
Android SDK Tools : 26.1.1
ios-deploy : 1.9.1
ios-sim : 5.0.13
Node : v6.11.4
npm : 3.10.10
OS : macOS High Sierra
Xcode : Xcode 9.0.1 Build version 9A1004
Environment Variables:
ANDROID_HOME : /Users/matt/Library/Android/sdk
Misc:
backend : pro
Managed to build finally,
I downgraded to ionic (Ionic CLI) : 3.13.1
and upgraded cordova-android
to 6.3.0
which cleared the FontFamilyError
but resulted in a different one:
Execution failed for task ':transformClassesWithDexForDebug'.
> com.android.build.api.transform.TransformException: com.android.ide.common.process.ProcessException: java.util.concurrent.ExecutionException: com.android.dex.DexException: Multiple dex files define Lorg/apache/cordova/BuildHelper;
However to fix that, this worked:
cordova plugin rm cordova-plugin-compat --force
cordova platform rm android
cordova platform add android@6.3.0
which I found here.
https://cordova.apache.org/announcements/2017/09/27/android-release.html#comment-3563629128