Visual Studio and onsen ui - error to build after change cordova to 6.0



  • Hi guys anyone is working with visual studio and can help me?
    I’ve changed my Cordova from 4.3 to 6.0
    and now all my projects cannot build

    I’m receiving this error

    FAILURE: Build failed with an exception.
    1>
    1>  * What went wrong:
    1>  Execution failed for task ':processDebugResources'.
    1>  > com.android.ide.common.process.ProcessException:       org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files   (x86)\Android\android-sdk\build-tools\23.0.1\aapt.exe'' finished with non-zero exit value 1
     1>
     1>
     1>  * Try:
    1>  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
     1>  BUILD FAILED
      1>
      1>  Total time: 3.53 secs
      1>  ERROR building one of the platforms: Error code 1 for command: cmd with args: /s,/c,"C:\Users\me\Desktop\Onsen_UI_app\app\platforms\android\gradlew cdvBuildDebug -b C:\Users\me\Desktop\Onsen_UI_app\app\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
     1>  You may not have the required environment or OS to build this project
      1>  Error code 1 for command: cmd with args: /s,/c,"C:\Users\me\Desktop\Onsen_UI_app\app\platforms\android\gradlew cdvBuildDebug -b C:\Users\me\Desktop\Onsen_UI_app\app\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
     ========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
     ========== Deploy: 0 succeeded, 0 failed, 0 skipped ==========
    


  • @Leonardo-Augusto said:

    Sorry I don’t have much information but some quick searching turned up:

    http://stackoverflow.com/questions/20737200/execution-failed-appprocessdebugresources-android-studio

    For me it helped to change the version of buildTools to: buildToolsVersion “21.0.1”. You will find this setting inside the file app/build.gradle.

    Also this one:

    http://stackoverflow.com/questions/21645961/android-studio-processdebugresources-failed



  • @munsterlander Hi bro, ! So that’s why you have reputation :)

    I’ve tried to follow your tip , but my build.gradle is different of the samples of link.
    So i found a file project.properties .

    target=android-22
    android.library.reference.1=CordovaLib

    so, i changed to target=android-21 and now i can run using cordova 5.1
    I’ll try with Cordova 6



  • @Leonardo-Augusto Lol! Yeah, I have gotten pretty hooked on Onsen and what it can do. I try to share and help people using it, because I figure the larger the user base is, the more cool features we will get! It’s the first platform that was really quick for me to implement.



  • Looking forward seems the problem is biggest lol

    visual stuio says:

    FAILURE: Build failed with an exception.
    1>
    1> * Where:
    1> Build file ‘C:\Users\ME\Desktop\Onsen_UI_MYPROJECT
    1.0.1\MYPROJECT\platforms\android\build.gradle’ line: 286
    1>
    1> * What went wrong:
    1> A problem occurred evaluating root project ‘android’.

    And in line 286 the code says:

    if (!storeFile.exists()) {
            throw new FileNotFoundException('Keystore file does not exist: ' + storeFile.getAbsolutePath())
        }
    

    but i have a keystore there

    My build.json

     {
      "android": {
        "release": {
          "keystore": "C:\\project-key.keystore",
        
       "storePassword":"numbershere",
         "alias":"me",
       "password":"numbershere",
              "keystoreType":"PKCS12"
            }
        }
     }
    


  • @Leonardo-Augusto I have had this issue before specifically. I fixed it by rebuilding my keystore. Once that happened, everything worked. No idea why that fixed it though.



  • OK I’ll check lol code code code error error lol



  • @Leonardo-Augusto Agreed! I have been working on this one function for close to a week now. I am so close but keep getting small inconsistencies right now. For whatever reason, a switch break is breaking a for loop, but when I go small scale to test it out, it works. Driving me nuts!



  • Also here bro . I’ve found a way to compile Cordova 5.1no errors , but now my project copy seems too crazy lol . I’ll delete and rebuild with a new copy for security (To keep the original project safe)

    Resolution
    Re-setup the Certificates
    Remove the PKCS12 setting for trust store set in the service parameters
    Delete everything after the final “—–END” line. Check the lines using a good editor that shows you the characters being used, don’t trust your eyes.
    Having back up of the keystore always helps to restore it when disaster happens.

    Font
    https://confluence.atlassian.com/jirakb/java-certificate-issue-ioexception-derinputstream-getlength-lengthtag-109-too-big-761505154.html

    I can’t build with Codova higher than 5.1, but , i was working using Cordova 4.3. So i had a good progress!



  • Well, progress is good! I as well have had a major breakthrough in what I was doing. Now I am just trying to nail down why my math is returning infinity for normalizing values for heatmaps. So close, I can feel it. The end is near!



  • @munsterlander hhahaha good ! May the Force be with you



  • OMG! After about 2 weeks, finally figured it out. Crazy too! I had written close to a 250 line function and after optimizing it and going back through the logic, I was able to reduce it to about 30 lines. Then with the heatmap normalization, one simple line to resolve a potential (and extremely nagging rare) math issue. BAM! Done.

    I love it when things finally work.



  • Now when I can build with Cordova 5.1 I’ve sent an update to google play and to my surprise arghhh I have a delay on my first page html. No code changes , just migrate cordova. And I thought , I’ll rebuild a new update … but when I try to send , google says … this APK must be higher than 1.0.1.8

    My visual studio settings alows 3 fields
    So I tried 1.0.9
    1.0.2,
    Or even 2.0.0 but I still receives this message.

    My problems now lol
    Delay after change to cordova 5.1 , no code changes.

    And Google update fails



  • @munsterlander Munster what is the problem?

    My 1° apk was 1.0.0 after 1.0.1 (but google says 1.0.0.0.1.8) and now i need to send other

    but i don’t know what. 1.0.2? My brain!!!

    0_1456962932948_2016-02-28.png
    remember that in visual studio i have 3 fields ( Major, minor build)



  • Solved here guys ohhhhh , Im’ tired lol simple thing ,but working a lot i burned my brain

    On visual studio we have 3 fields Major/Minor/Build
    But on another tab we have version code.
    So my version is 1.0.1 and my current version code 1.0.0.0.1.8 (To send new update 1.0.0.0.1.9)



  • @Leonardo-Augusto I would try going big with 1.1 and see what happens.

    The only other way I can think of is to manually sign your apk.

    https://support.google.com/googleplay/android-developer/answer/113476?hl=en

    http://developer.android.com/tools/publishing/versioning.html

    Also, what is your androidmanifest.xml actually show for version?



  • Yay! My problem was solved too. I finally found the math error. I had a closing parenthesis in the wrong spot.



  • @munsterlander lol is funny that sometimes the problem is before us and we are looking too distant . My problem , honestly , a matter to click on other tab and define the code version. I forgot it (Sorry my english)



  • which cordova version you are using ? 6?



  • @Leonardo-Augusto I am currently using 5.2.0. What features in 6 where you wanting to use?



  • @munsterlander nothing special. But on my ignorance i thought was good to work with a higher cordova version. Perhaps for security. Nowadays i have 2 apks on Google Play , all them using Cordova 4.3 And after Google say

    Your app uses a version of Apache Cordova that contains one or more security vulnerabilities.
    Lol i tried this update with cordova 5.1
    So i’ll keep my projects with 4.3 before i get courage to migrate lol


Log in to reply