[V4] The android "blank" app fails to launch?

I just started a new blank angular app, then tried to build the android app :

ionic start toto blank --type=angular
ionic prepare android
ionic cordova run android

The app is ok on my computer, builds without any error, but fails to launch on device, chrome inspector says

Failed to load resource: net::ERR_FILE_NOT_FOUND
runtime.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
styles.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
cordova.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
vendor.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
main.js:1 Failed to load resource: net::ERR_FILE_NOT_FOUND
/assets/icon/favicon.png:1 Failed to load resource: net::ERR_FILE_NOT_FOUND

I inspect this :

Redmi 5 Plus
#C7B988339905
WebView in io.ionic.starter (69.0.3497.100)

Ionic App
file:///android_asset/www/index.html
inspect

What am I missing ??

nobody has encoutered this behaviour ?

How are you building the app??

just as I posted above : start a blank app, prepare android, and run android (the cli installs the android platform on the way).
The problem seems to be that the device app is just a ‘copy’ of the www folder that works ok on my computer, and the folders are not set properly ?

connect your mobile to pc via usb cable select developers on and usb debbuging also then on cli try ionic cordova run android.

I tried (changed ionic run android to ionic cordova run android, but the problem remains…I get a blank screen on the device after the splashscreen is gone.

But all seems to be fine to the cli :


C:\Users\User\PROG\toto
λ ionic cordova run android
> ng run app:ionic-cordova-build --platform=android

Date: 2018-10-05T12:14:27.504Z
Hash: 40791cffd6adba8e9900
Time: 22613ms
chunk {common} common.js, common.js.map (common) 27.1 kB  [rendered]
chunk {166} 166.js, 166.js.map () 12.1 kB  [rendered]
chunk {cordova} cordova.js, cordova.js.map (cordova) 72.7 kB  [rendered]
chunk {0} 0.js, 0.js.map () 14.7 kB  [rendered]
chunk {1} 1.js, 1.js.map () 1.27 kB  [rendered]
chunk {2} 2.js, 2.js.map () 2.36 kB  [rendered]
chunk {3} 3.js, 3.js.map () 1.39 kB  [rendered]
chunk {4} 4.js, 4.js.map () 8.11 kB  [rendered]
chunk {5} 5.js, 5.js.map () 5.14 kB  [rendered]
....
chunk {160} 160.js, 160.js.map () 2.92 kB  [rendered]
chunk {162} 162.js, 162.js.map () 5.87 kB  [rendered]
chunk {main} main.js, main.js.map (main) 143 kB [initial] [rendered]
chunk {polyfills} polyfills.js, polyfills.js.map (polyfills) 227 kB [initial] [rendered]
chunk {runtime} runtime.js, runtime.js.map (runtime) 8.02 kB [entry] [rendered]
chunk {styles} styles.js, styles.js.map (styles) 36 kB [initial] [rendered]
chunk {vendor} vendor.js, vendor.js.map (vendor) 4.36 MB [initial] [rendered]
chunk {163} 163.js, 163.js.map () 12.7 kB  [rendered]
chunk {164} 164.js, 164.js.map () 210 kB  [rendered]
chunk {165} 165.js, 165.js.map () 15.7 kB  [rendered]
> cordova run android
ANDROID_HOME=C:\Users\User\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_161
Subproject Path: CordovaLib
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
        at build_1xqou2xbfj5io09wrbn0hseme.run(C:\Users\User\PROG\toto\platforms\android\build.gradle:137)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint UP-TO-DATE
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugShaders UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
:CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:prepareOrgApacheCordovaCordovaLib623DebugLibrary UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources UP-TO-DATE
:generateDebugSources UP-TO-DATE
:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:compileDebugJavaWithJavac UP-TO-DATE
:compileDebugNdk UP-TO-DATE
:compileDebugSources UP-TO-DATE
:mergeDebugShaders UP-TO-DATE
:compileDebugShaders UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets UP-TO-DATE
:transformClassesWithDexForDebug UP-TO-DATE
:mergeDebugJniLibFolders UP-TO-DATE
:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:processDebugJavaRes UP-TO-DATE
:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:validateSigningDebug
:packageDebug UP-TO-DATE
:assembleDebug UP-TO-DATE
:cdvBuildDebug UP-TO-DATE

BUILD SUCCESSFUL

Total time: 4.413 secs
Built the following apk(s):
        C:/Users/User/PROG/toto/platforms/android/build/outputs/apk/android-debug.apk
ANDROID_HOME=C:\Users\User\AppData\Local\Android\sdk
JAVA_HOME=C:\Program Files\java\jdk1.8.0_161
No target specified, deploying to device 'c7b988339905'.
Skipping build...
Built the following apk(s):
        C:/Users/User/PROG/toto/platforms/android/build/outputs/apk/android-debug.apk
Using apk: C:/Users/User/PROG/toto/platforms/android/build/outputs/apk/android-debug.apk
Package name: io.ionic.starter
LAUNCH SUCCESS

Are you using microsoft edge or chrome browser??

Just use the chrome browser.

I don’t want to use a browser !
My purpose is to build a ‘native’ android app to publish it on the google store…

What I can’t understant is why the “blank app” gives me a white screen… Is it a CLI bug?
I must be missing something, but what ?

I just wanted to know it it works fine on browser and problem only arises when on device.

that’s it : ok on computer, not ok on device

There must be something wrong.
Does the splash screen occurs and ends??
If nothing helps try removing the platform and re-adding it.

problem solved by removing and reinstalling ionic and cordova

Great, you solved it.