D/ProfileInstaller(14242): Installing profile for com.example.instagram_clone
Asked Answered
B

5

7

I am getting this error after completing the app instagram clone. I haven't run the app for a while so when I came back running the app it is giving me this error does anyone know the solution?

The error:

I/instagram_clon(14242): Compiler allocated 5171KB to compile void android.view.ViewRootImpl.performTraversals()
D/ProfileInstaller(14242): Installing profile for com.example.instagram_clone

And I am running on the real device, and I am seeing a black screen with this error in the terminal. What should I do?

Here is the screenshot:

enter image description here

Benzocaine answered 17/6, 2023 at 9:54 Comment(1)
Can you share your github codeDinnie
M
5

I was facing this issue when my emulator did not have an active internet connection. Make sure your emulator/phone and laptop are connected to internet.

(My app was using Supabase)

Also verify if you app makes API calls to unreachable endpoints if you are connected to internet.

Mcmillan answered 16/11, 2023 at 15:26 Comment(0)
S
3

I faced the same problem and the code was like this:

void main() async {
  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );
  runApp(const ChatApp());
}

and when I added one line like this:

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );
  runApp(const ChatApp());
}

the problem was solved and the app ran.

Superannuation answered 26/8 at 7:25 Comment(0)
A
1

I know you asked this question a year ago, but I just had a similar issue just minutes ago. And it appears to be reproducible. Android Studio hangs at "Installing profile for com.companyname.appname" whenever I hit "Run"

After a closer look, I realized I made a silly mistake: I had mistakenly used the arrow syntax after runApp in the main function. So, instead of:

void main() {
     runApp(MainPage());
}

I did this:

    void main() {
         runApp() => MainPage();
}

runApp is a function that takes a Widget as a parameter, and it doesn't return a value. The arrow syntax expands the code to runApp() { return MainPage(); } which doesn't make sense. However, Android Studio didn't give me an error. It just hangs when I run my code.

Android Studio Koala 2024.1.1 Patch 1, Flutter 3.24.0, Dart 3.5.0

Archiplasm answered 12/8 at 6:59 Comment(0)
L
-1

I understand the issue you're facing, and there are several potential solutions you can try to resolve it.

Run flutter clean in your terminal to clean the build artifacts and start with a fresh build.

If the problem persists, consider making a fresh copy of your Android folder, as this can sometimes resolve persistent issues.

However, if the error still persists after trying the above steps, it's possible that the hang-up is related to the initialization of external services like Firebase, AWS, or other APIs. Specifically, if you have used an await statement during the initialization process, it might lead to a long wait during profile initialization.

To address this, locate the main function in your code, and if you find an await statement for initializing Firebase or any other cloud resources, remove it. The proper way to set up SDKs for cloud resources is through their respective initialization methods without using await during app initialization

For example, instead of this:

await Firebase.initializeApp(); // REMOVE THIS LINE

Do This

void main() {
WidgetsFlutterBinding.ensureInitialized();
Firebase.initializeApp(); // Proper initialization without await
runApp(const MyApp());
}
Lordan answered 6/8, 2023 at 7:57 Comment(0)
T
-2

more like you copy and pasted the code lol, changing the api key may work

OR

remove the following lines of code from main.dart, before first run of your app (if using firebase), you may keep the main function async:

WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform);

you can add it later once the app is configured on the first run.

funny how you 'built' the app by yourself but are not aware of this little fix which everybody learns from a bit of hit and trial

Telephony answered 9/7, 2023 at 21:54 Comment(1)
nope, the thing is I deleted the android folder by mistake since then I am getting this errorBenzocaine

© 2022 - 2024 — McMap. All rights reserved.