pbreault / adb-idea

A plugin for Android Studio and Intellij IDEA that speeds up your day to day android development.
Apache License 2.0
2.1k stars 256 forks source link

Can not be used normally on Android Studio 4.1 #128

Closed liuweiqiang2016 closed 2 years ago

liuweiqiang2016 commented 3 years ago

When I use " ADB Uninstall App",Android Studio show “uninitialized.application.id is not installed on xiaomi“. Android Studio v4.1,Plugin v1.6.2

ultraon commented 3 years ago

The same issue with any emulator.

hellowwwwp commented 2 years ago

I fixed the bug: https://github.com/wp292519413/adb-idea latest adb-idea.zip: https://github.com/wp292519413/adb-idea/blob/master/adb_idea.zip

iCuiShuai commented 2 years ago

I fixed the bug: https://github.com/wp292519413/adb-idea latest adb-idea.zip: https://github.com/wp292519413/adb-idea/blob/master/adb_idea.zip

Fix not work on Android Studio Arctic Fox | 2020.3.1 Patch 2.

hellowwwwp commented 2 years ago

I fixed the bug: https://github.com/wp292519413/adb-idea latest adb-idea.zip: https://github.com/wp292519413/adb-idea/blob/master/adb_idea.zip

Fix not work on Android Studio Arctic Fox | 2020.3.1 Patch 2.

I did not test on Android Studio Arctic Fox | 2020.3.1 Patch 2, but it works on Android Studio Arctic Fox | 2020.3.1 Patch 3.

GaneshShetty951 commented 2 years ago

Merging Errors: Warning Package name 'uninitialized.application.id' used in: AndroidManifest.xml, AndroidManifest.xml. sample_app.carouselview manifest Still getting this error on Android Studio Arctic Fox | 2020.3.1 Patch 3.

ajans commented 2 years ago

I just investigated this problem, as it constantly plagues my usage of ADB idea. Turns out, it is totally not the fault of ADB idea (but it could show a hint to rebuild your project). This problem mainly happens just after you switched your build-type or build-flavor. You can verify that if you open your apps' AndroidManifest.xml and switch to the tab "Merged Manifest", it will show this line on the top as an attribute to the manifest-tag:

package = "uninitialized.application.id"

Simply rebuild the project ("Build" -> "Rebuild project") to fix this.

@pbreault please add some kind of UI-Notification with a hint to rebuild the project to fix this, as I am sure someone will forget about this workaround.

ajans commented 2 years ago

This issue on the official Android issue tracker confirms the source of this problem: https://issuetracker.google.com/issues/208178377#comment4

TLDR:

The short of it is that newer versions of Android Studio (since 4.2 I believe) now use an internal build cache as the primary source of project information. When Android Studio APIs are used to access the app's unique application ID prior to the first full build, the build cache returns this (unhelpful) token value.

liuweiqiang2016 commented 2 years ago

I just investigated this problem, as it constantly plagues my usage of ADB idea. Turns out, it is totally not the fault of ADB idea (but it could show a hint to rebuild your project). This problem mainly happens just after you switched your build-type or build-flavor. You can verify that if you open your apps' AndroidManifest.xml and switch to the tab "Merged Manifest", it will show this line on the top as an attribute to the manifest-tag:

package = "uninitialized.application.id"

Simply rebuild the project ("Build" -> "Rebuild project") to fix this.

@pbreault please add some kind of UI-Notification with a hint to rebuild the project to fix this, as I am sure someone will forget about this workaround.

Great! This solved my problem very well.