Software Archive
Read-only legacy content
17061 Discussions

Cannot build App for Android

Nick_F_2
New Contributor III
587 Views

I Have an app.

CLI set to 5.1.1. App compiles for iOS, compiles for CrossWalk Android, but will not build for Android.

Error is:-
 

  • An unexpected error occured while attempting to build the application.

 

:processReleaseManifest.../myappname/platforms/android/AndroidManifest.xml:33:5 Error:
	uses-sdk:minSdkVersion 10 cannot be smaller than version 14 declared in library .../myappname/platforms/android/build/intermediates/exploded-aar/android/CordovaLib/unspecified/release/AndroidManifest.xml
	Suggestion: use tools:overrideLibrary="org.apache.cordova" to force usage
 FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':processReleaseManifest'.
> Manifest merger failed : uses-sdk:minSdkVersion 10 cannot be smaller than version 14 declared in library .../myappname/platforms/android/build/intermediates/exploded-aar/android/CordovaLib/unspecified/release/AndroidManifest.xml
  	Suggestion: use tools:overrideLibrary="org.apache.cordova" to force usage

* 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: 7.59 secs

.../myappname/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error code 1 for command: .../myappname/platforms/android/gradlew with args: cdvBuildRelease,-b,.../myappname/platforms/android/build.gradle,-Dorg.gradle.daemon=true
Command finished with error code 8: .../myappname/platforms/android/cordova/build --release
ERROR building one of the platforms: Error: .../myappname/platforms/android/cordova/build: Command failed with exit code 8
You may not have the required environment or OS to build this project
Error: .../myappname/platforms/android/cordova/build: Command failed with exit code 8
    at ChildProcess.whenDone (/Developer/cordova/5.1.1/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:134:23)
    at ChildProcess.EventEmitter.emit (events.js:98:17)
    at maybeClose (child_process.js:743:16)
    at Process.ChildProcess._handle.onexit (child_process.js:810:5)

I have changed the actual app name to myappname to hide the true app name.
0 Kudos
2 Replies
Nick_F_2
New Contributor III
587 Views

The problem seems to stem from the fact I copied and existing project and renamed it to create a new version so that I can backtrack if I break the app.
The compiler seemed to get confused as the name that the compile log referred to was not the file I had uploaded.

I returned to my original version just taking a backup copy made the same mods and it compiled without any errors.

Are there any recommendations on copying and renaming a project.

0 Kudos
PaulF_IntelCorp
Employee
587 Views

Nick, best way to make a copy of a project is:

  • make a copy of your existing project, the entire project directory
    on Windows, use File Explorer to "right-click" and "copy" your project directory, then "right-click" and "paste"
    on Mac use Finder to to "right-click" and then "duplicate" your project directory
     
  • inside the new project that you made above, rename the <project-name>.xdk file and <project-name>.xdke files to something like project-copy.xdk and project-copy.xdke (anything you like, just different than the original, preferably the same name as the new project folder in which you are doing this)
     
  • using a TEXT EDITOR (only), such as Notepad or Sublime or Brackets or some other TEXT editor, open the new "project-copy.xdk" file (whatever you named it) and find the line named projectGuid, it will look something like this:
    "projectGuid": "a863c382-ca05-4aa4-8601-375f9f209b67",
     
  • change the "GUID" to all zeroes, like this: "00000000-0000-0000-000000000000"
     
  • save the modified "project-copy.xdk" file
     
  • open the Intel XDK
     
  • go to the Projects tab
     
  • select "Open an Intel XDK Project" (green button) at the bottom left of the Projects tab
     
  • locate the new "project-copy.xdk" file inside the new project folder you copied above to open this new project
0 Kudos
Reply