Unable to run Ionic app after update to Android Studio 3.0

后端 未结 9 2492
野趣味
野趣味 2020-12-13 04:32

Here\'s my Ionic Info

cli packages: (/Users/billb/dev/customer-mkt-app/node_modules)

@ionic/cli-utils  : 1.15.2
ionic (I         


        
相关标签:
9条回答
  • 2020-12-13 05:09

    If you are using Cordova build.gradle is automatically generated and when you next build the project the change in accepted answer above get overwritten back to the old that doesn't work.

    So edit platforms/android/cordova/lib/builder/GradleBuiler.js Comment out lines 136-139 and add the next line

    /*depsList += '    debugCompile(project(path: "' + libName + '", configuration: "debug"))';
    insertExclude(p);
    depsList += '    releaseCompile(project(path: "' + libName + '", configuration: "release"))';
    insertExclude(p);
        */
        depsList += "    compile project(':CordovaLib')";
        insertExclude(p);
    
    0 讨论(0)
  • 2020-12-13 05:14

    This is a known problem you can find the related jira issue here and the underlying problem is this one and both are "in progress". And there is already a pull request on github which you can try out but I can't promise you that it is already a working version. You can install it like this if you would like to try that:

    cordova platform add https://github.com/infil00p/cordova-android.git#StudioThreeFix
    
    0 讨论(0)
  • 2020-12-13 05:14

    Add this in Android build .gradle dependencies. That's all.

    compile project(':CordovaLib')
    

    For example:

    dependencies {
        compile fileTree(dir: 'libs', include: '*.jar')
        // SUB-PROJECT DEPENDENCIES START
        //debugCompile(project(path: "CordovaLib", configuration: "debug"))
        //releaseCompile(project(path: "CordovaLib", configuration: "release"))
        compile project(':CordovaLib')
        compile "com.android.support:support-v4:24.1.1+"
        compile "com.google.android.gms:play-services-analytics:+"
        // SUB-PROJECT DEPENDENCIES END
    }
    
    0 讨论(0)
提交回复
热议问题