Local path doesn't exist - Android Studio

Hello,
i create a new project, so i have a "hello world" program which created. I run this program and i have a error.
Code:
Waiting for device.
Target device: Nexus_5_API_21_x86 [emulator-5554]
Uploading file
local path: ..\app-debug.apk
remote path: /data/local/tmp/com.example.user.rotationecran
Local path doesn't exist.
I don't have the file app-debug.apk in my folder's project

create debug-app in build tab on android studio
check that in manifest if your app is enabled for debugging

Related

Remove DigiNotar Certificate Authority from a rooted phone

With recent successful DNS attacks and hacked certificates in the wild I decided to remove the DigiNotar Certificate authority from the list of trusted CA's on my device. If you know what you are doing the steps are pretty easy. YMMV.
I performed this work on my Windows 64-bit PC with Java and the Android SDK tools (which I have in C:\android-sdk-windows\).
Download the BouncyCastle jar from:
http://bouncycastle.org/download/bcprov-jdk16-141.jar
Move the jar into the $JAVA_HOME\lib\ext folder. On my computer that is:
C:\Program Files (x86)\Java\jre6\lib\ext\
Connect your USB cable to your phone and verify with adb that it is seen as attached.
C:\android-sdk-windows\tools>adb devices
Pull the cacert.bks file from your phone:
C:\android-sdk-windows\tools>adb pull /system/etc/security/cacerts.bks cacerts.bks
Dump the list of CA's out of the cacerts.bks file:
C:\android-sdk-windows\tools>"\Program Files (x86)\Java\jre6\bin\keytool.exe" -keystore cacerts.bks -storetype BKS -provider org.bouncycastle.jce.provider.BouncyCastleProvider -storepass changeit -v -list > calist.txt
Open the calist.txt file in a text editor, find the DigiNotar CA in the list and note the alias name number. Using the alias name number, delete the DigiNotar CA from the cacert.bks file:
C:\android-sdk-windows\tools>"\Program Files (x86)\Java\jre6\bin\keytool.exe" -keystore cacerts.bks -storetype BKS -provider org.bouncycastle.jce.provider.BouncyCastleProvider -storepass changeit -v -delete -alias <alias name number from your list>
For example:
C:\android-sdk-windows\tools>"\Program Files (x86)\Java\jre6\bin\keytool.exe" -keystore cacerts.bks -storetype BKS -provider org.bouncycastle.jce.provider.BouncyCastleProvider -storepass changeit -v -delete -alias 81
Then put the updated cacert.bks file back on your phone:
C:\android-sdk-windows\tools>adb remount
C:\android-sdk-windows\tools>adb push cacert.bks /system/etc/security/
Finally, reboot your phone so it reloads the CA list.
NOTE: This helper is based on Tim Strazzere's post on:
http://blog.mylookout.com/2011/08/f...-open-heart-surgery-on-your-android-ca-store/ which I found on the CyanogenMod dev forums at http://code.google.com/p/cyanogenmod/issues/detail?id=4260
Now there's an App for that. CaCertMan
https://guardianproject.info/2011/09/05/cacertman-app-to-address-diginotar-other-bad-cas/
md303 said:
Now there's an App for that. CaCertMan
https://guardianproject.info/2011/09/05/cacertman-app-to-address-diginotar-other-bad-cas/
Click to expand...
Click to collapse
It's now on the Market !!!!!
I don't see it on my Nexus One (Rom in signature) or my stock Dell Streak 7. Haven't looked at my Nook Color running CM7 yet, but I'd have to guess it's still there to to their refusal to remove the CA from CM7. At least people have a choice with CACertMan.

[Q] installing of app on device failed

I've recently returned to work on an app I developed while ago (targeted then to 4.4). at the time I had a galaxy s2 for debugging and now I have s4 (i9500).
I tried to run the app while my phone connected and got installation failed. So I installed Android studio and imported (converted) and changed target to 5.0.1 (my phone's version).
When I hit run (or debug) I get this message:
HTML:
nstalling myapp.leff.app
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/myapp.leff.app"
Aborted
Launching application: myapp.leff.app/myapp.leff.app.myappAppActivity.
DEVICE SHELL COMMAND: am start -n "myapp.leff.app/myapp.leff.app.myappAppActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Aborted
filltering the log-cat (Android) i've noticed this lines:
HTML:
06-24 02:20:34.641 3269-3685/? D/SettingsProvider﹕ name = verifier_verify_adb_installs
06-24 02:21:30.331 3576-3576/? W/Settings﹕ Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
06-24 02:21:30.426 3576-3576/? W/Settings﹕ Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
06-24 02:21:46.231 9094-9094/? I/MultiDex﹕ install
06-24 02:21:46.261 9094-9094/? I/ProviderInstaller﹕ Insert disabled by gate 'gms:security:enable_conscrypt_in_gms_application'
06-24 02:21:49.656 3576-3576/? W/Settings﹕ Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
06-24 02:21:49.716 3576-3576/? W/Settings﹕ Setting install_non_market_apps has moved from android.provider.Settings.Global to android.provider.Settings.Secure, returning read-only value.
06-24 02:22:00.016 3269-3269/? I/ActivityManager﹕ Killing 4849:com.samsung.android.app.filterinstaller/1000 (adj 15): empty for 1806s
I've re-installed new version of my custom rom - result is the same
I took another phone (samsung s5) and install was success. connected my s4 again. same error.
And ideas on how to resolve this?
note: usb-debugging is active
Hello,
Your project before conversion was built with Eclipse, if I understood it correctly? If so,
in Android Studio, the API targeting is not being read from the Android Manifest, but from the Gradle files.
In Android Studio, open (on your Project tree on the left), under the Gradle Scripts the build.gradle (Module: app) and check if inside the defaultConfig the targetSdkVersion has the correct API level. Then, press Build->Clean project from the menu bar on the top
If your application works with this String: INSTALL_NON_MARKET_APPS from the Settings.Global class , it is deprecated in API level 21, so use INSTALL_NON_MARKET_APPS from the Settings.Secure class instead. Check here.
I think it has to do with this class, the getString method with the above String that has been deprecated. I could help you further if I knew how is your app accessing this class or any code related to that
The S5 you tested has custom rom? Can you post the full logcat with the S4?
If you still need help, let me know

Error:(45, 33) Gradle: error: package com.google.android.gms.ads does not exist

I am working on android studio and have installed Google Repository alongside the Play Services. I have already tried many solutions but none of them seem to work for me. I have this line in my build.gradle file under dependencies of Android:
compile "com.google.android.gms: play-services-ads:10.2.6"
I am trying to import MobileAds in my Main class:
import com.google.android.gms.ads.MobileAds;
But it gives me the error: error: package com.google.android.gms.ads does not exist. Where am I going wrong?
My build.gradle file: pastebin.com/DmnjCrwK
try using "compile 'com.google.firebase:firebase-ads:10.2.6'" in your gradle file

A problem occurred configuring project

I am trying to compile some C++ source files into a native library using Android studio, NDK and Cmake, but upon building, I get the error:
Code:
A problem occurred configuring project ':mobile'.
> C:\Users\User\Documents\B3d\mobile\.externalNativeBuild\cmake\debug\armeabi-v7a\compile_commands.json
I went to the folder mentioned in the error and 'compile_commands.json' does not exist there. What could be the problem?
After upgrading gradle plugin, I get the error:
Code:
C:\Users\User\Documents\B3d\mobile\CMakeLists.txt : C/C++ debug|armeabi-v7a : Could not get version from cmake.dir path '"C:\Android\android-sdk\cmake\3.19.0"'.
I removed the quotes from cmake.dir path in local.properties and this error was gone, next I got another error:
Code:
exception while building Json $C:\Users\User\Documents\B3d\tv\.cxx\cmake\debug\armeabi-v7a\compile_commands.json (The system cannot find the file specified)

Android Studio 4.1.1 has built- in compilation failures

I have installed the latest Android Studio onto a new machine, and have installed Flutter plugin into the new installation. I then created a Flutter project, taking all the default settings.
After creating the project, I set up an emulator and tried to compile and run the flutter app. Unfortunately I get the following error:
Code:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Users\rbrown3\AndroidStudioProjects\flutter_app\android\build.gradle' line: 26
* What went wrong:
A problem occurred evaluating root project 'android'.
> A problem occurred configuring project ':app'.
> Failed to notify project evaluation listener.
> Uninitialized object exists on backward branch 142
Exception Details:
Location:
com/android/build/gradle/internal/pipeline/VariantInfoImpl.<init>(Lcom/android/build/gradle/internal/scope/VariantScope;)V @200: goto
Reason:
Error exists in the bytecode
Bytecode:
...bytecode listing omitted for brevity...
Note that I also took a look at the build.gradle file that contained the offending line . Line 26 just contains:
Code:
project.evaluationDependsOn(':app')
I did not edit that line at all. In fact, I did not change anything, not even in the main.dart file.
Have I found a bug in the Flutter plugin? Or is it an Android Studio bug? Why does a pristine installation of Android Studio fail to compile default code due to a flaw in a gradle build file??? More importantly, what is the flaw causig these compilation failures and how do I fix it?

Categories

Resources