seamlink-aalves opened a new issue #43:
URL: https://github.com/apache/cordova-serve/issues/43


   # Bug Report
   
   ## Problem
   Cannot simulate Android in browser. I get error `Error: Project does not 
include the specified platform: android` although it's added
   
   ### What is expected to happen?
   Launch browser with app
   
   
   
   ### What does actually happen?
   I get error `Error: Project does not include the specified platform: 
android` 
   
   
   ## Information
   util.js file that calls Api class from each platform with no parameters 
(line 82). In cordova-android the root definition was changed from this.root = 
path.resolve(__dirname, '..'); (v.9.1.0) to this.root = platformRootDir; (v.10).
   
   When trying to set the app main path (line 66) const appMain = 
path.join(this.root, 'app', 'src', 'main'); because the first parameter is 
undefined.
   
   To make it work I have to change line 82 and 83 of util.js to:
   `
        const platformRootFolder = path.join(cordovaProjectRoot, 'platforms', 
platformName);
           const Api = require(path.join(platformRootFolder, 'cordova/Api'));
           return new Api(platformName, platformRootFolder).locations.www;`
   
   ### Environment, Platform, Device
   Cordova: 10.0.0
   Cordova-android: 10.0.1
   SO: Windows 10 PRO
   
   
   ## Checklist
   
   - [x] I searched for existing GitHub issues
   - [x] I updated all Cordova tooling to most recent version
   - [x] I included all the necessary information above
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to