Android Studio : SuperpoweredAdvancedAudioPlayer.h: No such file or directory - java

Trying to run the Android Crossexample app that comes with the Low-Latency-Android-Audio-iOS-Audio-Engine from superpowered (https://github.com/superpoweredSDK/Low-Latency-Android-Audio-iOS-Audio-Engine/tree/master/Android/CrossExample/app/src/main/java/com/superpowered/crossexample).
I'm getting: SuperpoweredAdvancedAudioPlayer.h: No such file or directory.
Based on #Stacks13 suggestion, I'm wondering if my local.properties file needs something more. Here's what it's got now:
ndk.dir=/Users/mh/android-ndk-r12b
sdk.dir=/Users/mh/phonegap/android-sdk/adt-bundle-mac-x86_64-20131030/sdk
I'm new to Android Studio and Superpowered and would appreciate suggestions as to how to resolve this.
The solution offered by Даниил Дедов worked for me. However, it brings up two questions:
1) I notice the local.properties file says at the top:
## This file is automatically generated by Android Studio.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
So it seems wrong that editing it is effective.
2) Can anyone tell me why superpowered.dir is gray? (See screen shot below.)

I hope this will help you.
Add a path to SuperpoweredSDK\Superpowered directory in local.properties:
superpowered.dir=C\:\\SuperpoweredSDK\\Superpowered

The instructions are available here -
https://github.com/superpoweredSDK/Low-Latency-Android-Audio-iOS-Audio-Engine
Just scroll down to README.md

Related

IInAppBillingService.java does not generate Java file in Android Studio

I am following this tutorial:
https://developer.android.com/google/play/billing/billing_integrate.html#billing-permission
No InAppBillingActivity file is generating. I'm not sure why. I checked to make sure everything is placed correctly but no luck. Here is what my folder structure looks like:
Click this for picture
Now I know there are similar questions like this but none of them were able to solve my problem. I have already imported googles billing library as well. No file generates when I run / build the app.
The problem is that the docs are not very accurate in specifying where it is that you will find the java file that should be in the gen folder. I had faced the same problem and had broken my head over it, until I found that the .java file was infact generated and it was in the path :
\app\build\generated\source\aidl\debug\com\android\vending\billing\IInAppBillingService.java
Its not a headache issue and your code runs smoothly itself without any interventions required. Hope this helps!
In android studio double click on your package name:
click in New and then on AIDL
Hope it helps
Its usually generated but not put where the tutorial tells you. If you do a Ctrl+N and type in the class name in intelliJ you may be able to find it

Android JavaCV - UnsatisfiedLinkError and couldn't find "libopencv_core.so"

I use JavaCV 1.1. I have added jar files (javacv.jar, javacpp.jar and opencv.jar) and *.so libraries to my project in Android Studio. I succesfully build and run my app on Android 5.1 phone, but when i try use functions, that used OpenCV i get error:
java.lang.UnsatisfiedLinkError:dalvik.system.PathClassLoader[DexPathList[[zipfile"/data/app/com.example.dogan.ligntningshower-/base.apk"],nativeLibraryDirectories=[/vendor/lib, /system/lib]]] couldn't find "libopencv_core.so"
I try to add
static {
System.loadLibrary("opencv_core");
System.loadLibrary("jniopencv_core");
}
but it's no work. How to fix it?
I just add *.so libs to folder /app/src/main/jniLibs/armeabi and now all works fine!
if someone still looking for the answer, first you should check if you added correct files to jniLibs folders. heres a complete tutorial :
A Beginner’s Guide to Setting up OpenCV Android Library on Android Studio
second, if .os files are at their places in each and every folder then you should only change the names to the name that is showing up in the compiler error.
in my case the names were libopencv_java3.so and yet the compiler was saying couldn't find "libopencv_java343.so" . after changing the name to libopencv_java343.so it worked.

issue renaming package in android studio

I'm trying to rename my app package name in android studio because when I try to upload to google play it says prefix "com.example" is reserved. So I've been to manifest file - double click in "example" and then refractor this, changed to "myapps" and changed it in the whole project.
Now I try to upload it and I still get the same error message. Anybody knows how to fix this error ?
Many thanks in advance
It seems simple. There are many ways from which one is this:
After you change the name manually in the AndroidManifest.xml, you click on the R.java class and then press F6.
R.java resides in the app/build/generated/source/r/debug/(packagename) directory. It contains resource IDs for the things you use in the android app. Check this question for more information.
Also, Amir is right, try to use a more unique package name. Example: com.(familyname) or your company domain.
For further information, you can visit this question.

OpenCV2.4.9.jar file

I want to use OpenCV library in my android app. I have downloaded OpenCV 2.4.9 and I have performed all the steps mentioned in the tutorial I followed, error was
opencv.android....cannot be resolved
When I searched for this I came to know that I should include opencv_library-2.4.9.jar file. But opencv_library-2.4.9.jar was not present in the file I have downloaded. But then, I have added opencv_library-2.4.3.jar to the project and I am not able to find the 2.4.9.jar file. Can anyone help me in solving the problem?

java.lang.NoClassDefFoundError: com.google.ads.AdView

I am attempting to incorporate admob ads in my app. So far I have added the following code
in the onCreate method of my app's main activity...
adView = new AdView(this,AdSize.BANNER,"my code number");
adView.loadAd(new AdRequest());
The program compiles without error but at run time I get the message java.lang.NoClassDefFoundError: com.google.ads.AdView. I have seen a supposed explanation of the problem and the cure here but I could not see how it was applicable to my project because I do not have either a "lib" or "libs" directory within my project.
According to eclipse's SDK manager, I have the most up to date version of everything that I use.
I had a similar problem, but did not have to add the libs folder; I tried, with no success, then removed them afterwards, when I realized that I had just forgotten to export the included Jar archived.
Fix:
Select project settings > Java Build Path, then Order and export.
Here, check the GoogleAdMobAdsSdk-package.
This should solve the NoClassDefFoundError-issue.
Just create manually the "libs" folder, and add your libraries there. By default, they doesn't exist
Project-> Clean
Project settings -> Java Build Path. Open "Order and export" tab.
Check GoogleAdMobsAdsSDK.
It is worked for me.
Was getting this error updating from android 16 to 20.
Solved by going to Java Build Path, Order and Export tab, checked and moved GoogleAdMobAdsSdk just under my source. For some reason that fixed it.
Changing the order back didn't break it. So some setting must have needed to be initialized.
I had this problem, and this problem too:
Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode and Multiple dex files define Lcom/google/ads/AdRequest$ErrorCode
Despite many hours of following all solutions listed the only way I could get my app to work was to use the AdMob banner example here:
https://github.com/googleads/googleads-mobile-ios-examples/tree/master/admob/SmartBannerExample
And re-build my project around it, copying my files in to that project. If you are stuck, try it.
Don't know why it worked, but now it does. Something in my project was very wrong. Now I can carry on with my work. I love Google/Android, but really what a mess!
See this answer Android update 17 seems incompatible with external Jars.
You need to put all jars in libs folder insted of lib.
It's not enough only to add "GoogleAdMobAdsSdk-6.4.1.jar" in Java Build Path,then you should switch to table:Order and export.check the "GoogleAdMobAdsSdk-6.4.1.jar" here.
UPDATE:
Select project settings > Java Build Path, then Order and export.
Here, check the google-play-services.jar.
This should solve the NoClassDefFoundError-issue.
In my case I needed to click on the "Android Private Libraries" on the "Order and Export" Tab
Go to Properties - Java Build Path - Order and Export and check every Checkmark! That did the trick for my project.

Categories