Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck at Installing build\app\outputs\apk\app.apk... #170

Closed
wyxcoder opened this issue Nov 10, 2019 · 29 comments
Closed

Stuck at Installing build\app\outputs\apk\app.apk... #170

wyxcoder opened this issue Nov 10, 2019 · 29 comments

Comments

@wyxcoder
Copy link

I used to use 1.2.1, it worked fine and nice. Since a few days ago, I got 'keep stopping'. Then I tried to use the most up to date version and need add a new MyApplication.

But with it, I cannot start the app, it stuck at Installing build\app\outputs\apk\app.apk..., any idea?

@johnny-stevie
Copy link

in android manifest.xml change
android:name=".DemoApplication"
to
android:name="io.flutter.app.FlutterApplication"
The problem is that the line above is the one that starts the application.
See if that will help, it helped me when I reached that problem.

@johnny-stevie
Copy link

johnny-stevie commented Nov 13, 2019

Scrap that, I have found out that that you need to put the MyApplication file under your project dir like com.xxx.xxx. This makes it work as thats where build.gradle goes to to start your app.
Whats your MyApplication code, just out of interest?

@xiongjianchang
Copy link

My project also had this problem. I thought Android build functionality had failed, but I didn't know how to get it working again.

@johnny-stevie
Copy link

@xiongjianchang Did you figure it out?

@xiongjianchang
Copy link

@johnny-stevie @wyxcoder
My problem has been solved.

  1. Select 'File > Open... ',
  2. Navigate to your Flutter app directory, select the 'android' folder inside, and click 'OK' to open an android project.
  3. Select 'File > invalidate caches/restart... '.
    Wait until the project is rebuilt and ready to use.

@RafaelR7
Copy link

I got the same problem, changing the android:name to .DemoApplication makes the build stuck,
changing the android:name to the default value, when I try to make a download crashes de app without any error message.

@RafaelR7
Copy link

I was able to build the apk, in the DemoApplication.java insert at the beginning package of your project ie: io.com.hellorword;,

@johnny-stevie
Copy link

So you were missing a java import package statement?
I realised for my project that I had to write my DemoApplication in kotlin instead of java which was the whole reason why it didn't work.
Good to know you've solved your issue.
Anybody else reading this with a problem similar to mine, remember, CHECK which language your android folder uses!!!

@RafaelR7
Copy link

@johnny-stevie Yes, I was missing the package import, I just realise that by looking into the example, the readme of the package is missing this import.

@HassanDev13
Copy link

Github1

help plaise?

@HassanDev13
Copy link

Github2

my app keep craching

@johnny-stevie
Copy link

johnny-stevie commented Jan 11, 2020 via email

@HassanDev13
Copy link

HassanDev13 commented Jan 11, 2020 via email

@RafaelR7
Copy link

take a look at the example, and compare it with your project, because the example is working.
It might help, that's what I did.

@johnny-stevie
Copy link

johnny-stevie commented Jan 11, 2020 via email

@befora
Copy link

befora commented Jan 11, 2020

@HassanDev13

I just fixed my crash by including package declaration above imports. If you just copy and paste the readme it won't work because it is missing.

package com.github.sethchhim.example

import io.flutter.app.FlutterApplication
import io.flutter.plugin.common.PluginRegistry
import io.flutter.plugins.GeneratedPluginRegistrant
import vn.hunghd.flutterdownloader.FlutterDownloaderPlugin

Hope this helps.

@hnvn
Copy link
Member

hnvn commented Jan 12, 2020

See #214 (comment)

@HassanDev13
Copy link

Github1
the problem still exists
I noticed the GeneratedPluginRegistrant class of Exemple is different with my project any idea?

@hnvn
Copy link
Member

hnvn commented Jan 12, 2020

delete your android folder and run this command to re-generate it.

flutter create -a java .

@HassanDev13
Copy link

i run this command and he show me :
No option specified for the output directory.
Create a new Flutter project.
If run on a project that already exists, this will repair the project, recreating any files that are missing.

Usage: flutter create
-h, --help Print this usage information.
--[no-]pub Whether to run "flutter pub get" after the project has been created.
.
.
.
.
--project-name The project name for this new Flutter project. This must be a valid dart package name.
-i, --ios-language [objc, swift (default)]
-a, --android-language [java, kotlin (default)]
--[no-]androidx Generate a project using the AndroidX support libraries
(defaults to on)
Run "flutter help" to see global options.

@hnvn
Copy link
Member

hnvn commented Jan 12, 2020

flutter create -a java .

There'a dot sign at the end of the command, it's a part of the syntax, not a typo error

@HassanDev13
Copy link

it work's no crashing ...when i download image it's okey but pdf or video show me Failed

github_mobile

@hnvn
Copy link
Member

hnvn commented Jan 13, 2020

any logs?

@HassanDev13
Copy link

logs
when i click in the download icon for pdf fils

@hnvn
Copy link
Member

hnvn commented Jan 14, 2020

@hnvn
Copy link
Member

hnvn commented Jan 15, 2020

Anything updated? If not, I am going to close this issue.

@HassanDev13
Copy link

the problem still with me

@hnvn
Copy link
Member

hnvn commented Jan 16, 2020

Give me logs from Logcat

@hnvn
Copy link
Member

hnvn commented Jan 20, 2020

@HassanDev13 , you can see the solution in #224. I will close this issue

@hnvn hnvn closed this as completed Jan 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants