Android Studio – local path doesn’t exist

I originally saw this error after upgrading from 0.2.13 to 0.3. These instructions have been updated for the release of Android Studio 0.5.2. These are the steps I completed to resolve the issue. 1.In build.gradle make sure gradle is set to 0.9.0 buildscript { repositories { mavenCentral() } dependencies { classpath ‘com.android.tools.build:gradle:0.9.0’ } } 2.In … Read more

install / uninstall APKs programmatically (PackageManager vs Intents)

Android P+ requires this permission in AndroidManifest.xml <uses-permission android:name=”android.permission.REQUEST_DELETE_PACKAGES” /> Then: Intent intent = new Intent(Intent.ACTION_DELETE); intent.setData(Uri.parse(“package:com.example.mypackage”)); startActivity(intent); to uninstall. Seems easier…

How to run .APK file on emulator [duplicate]

Steps (These apply for Linux. For other OS, visit here) – Copy the apk file to platform-tools in android-sdk linux folder. Open Terminal and navigate to platform-tools folder in android-sdk. Then Execute this command – ./adb install FileName.apk If the operation is successful (the result is displayed on the screen), then you will find your … Read more

How to check programmatically if an application is installed or not in Android?

Try with this: public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); // Add respective layout setContentView(R.layout.main_activity); // Use package name which we want to check boolean isAppInstalled = appInstalledOrNot(“com.check.application”); if(isAppInstalled) { //This intent will help you to launch if the package is already installed Intent LaunchIntent = getPackageManager() .getLaunchIntentForPackage(“com.check.application”); startActivity(LaunchIntent); … Read more

Upload failed You need to use a different version code for your APK because you already have one with version code 2

For people who use Android Studio the problem may be solved by editing versionCode and versionName in build.gradle instead of AndroidManifest.xml. e.g. defaultConfig { applicationId “com.my.packageId” minSdkVersion 15 targetSdkVersion 22 versionCode 2 <– change this versionName “2.0” <– change this }

How to set versionName in APK filename using gradle?

I only have to change the version name in one place. The code is simple too. The examples below will create apk files named named MyCompany-MyAppName-1.4.8-debug.apk or MyCompany-MyAppName-1.4.8-release.apk depending on the build variant selected. Note that this solution works on both APK and App Bundles (.aab files). See Also: How to change the proguard mapping … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)