Decompiled APK file manager - android-studio

I've decompiled an APK file, of which I already had the source code.
But the folder I get after compilation is different from "normal".
In the normal folder (I'm implementing on Android Studio) I have:
.grandle
.idea
app
build
grandle
.gitignore
build.grandle
grandle.properties
gradlew
gradlew.bat
local.properties
settigs.gradle
.iml
In the decompiling folder I have:
AppInventor
com
wildebeest
kawa
org
This if I try to load it directly with Android Studio does not work.
How do I get a downloadable folder from Android Studio?

You can't, because on decompiling an apk, you get only the source code, and not the gradle settings, dependencies etc.

You can't use decompiled source code into the Android Studio as it is not java code.

Related

Android Sutido 3.4 problem of including jni.h

I upgrade Android Studio 3.2 to 3.4 and encounter a problem.
Add a test.cpp source file to CMakelist and Sync project but it doesn't work. Android Studio prompt me:
This file is not part of the project. Please include it int the appropriate build file(build.gradle, CMakeList.txt or Android.mk etc) and sync the project
When I build the project. the cpp source works. and when I include jni.h. the jni.h has red alert. But compiles for no problem. The existing cpp files have no such problem. They include jni.h successfully and have no red alert.
Could you tell me what happens. Does Android Studio 3.4 have a bug?
Try to clean the IDE caches and project iml file, i.e. the .idea and .gradle and .iml under your project root dir.

How to restore gradle and java files in android studio

I wanted to look at my gradle and java files as a txt file but I accidentally set the files to open in notepad by default. Now none of my android studio projects will load because it's trying to load the java and gradle files in notepad and they aren't loading in android studio. Is there anyway to change this back?
Are you now using Android Studio? Please do following steps on your Android Studio
Go to Your project Directory and remove .gradle file
Import Your project using Android Studio
File > Re-Import Gradle Project

Android Studio "Scanning For Files To Index"

I am trying to achieve the following project structure in Android Studio
project/
projectA/
projectB/
Where projectA is an "app" module created by Android Studio which I have renamed, and projectB is a Kotlin project I wish to depend on in the app. I can get the projects to appear correctly as modules in my project however no matter what I try, as soon as I add projectB to my Android Studio project, it seems to get stuck in a loop "searching for files to index". When I look at the files it is always just looping through the same 2-3 files. They are always META-INF files but not always the same ones.
How do I successfully add a module to an Android Studio Project without hitting this error or how can I set out my project from the start to achieve this structure?
Thanks.
The problem seemed to be that I had a gradle/ directory under my project/projectB directory that was there because the project was originally created as a standalone project by IntelliJ. Deleting that fixed the issue.

How to restore build.gradle and .Gradle folder

When I was trying to solve an issue with Android Studio I accidentally deleted .Gradle folder at the top of the project and build.gradle from within the app. I will post a screen shot of my project in Android Studio. The build tab also produces "make module my app project name" and "deploy module to app engine". The usual clean project, rebuild.... are not there.
How can I restore them?
If your are not using a VCS:
try use the local history to recovery the build.gradle file in your root folder (right click on the root folder)
If it fails. you can create a new project and copy the build.gradle. Usually this file contains generic info (like android gradle pluging and the repos to be used in the modules)
the .gradle folder is not a problem. Gradle wrapper will recreate this file
I copied both from a different project and pasted them in my project. That didn't solve the problem and I imported the project File->new->import project but that only created a duplicate within my project. I closed the project and deleted it from the list of project in Android studio. Then I created a project by importing it from Android Studio Projects folder. It took forever stuck in the gradle build and I have to restart AS manually. Now I have all my files and the project is compiling as it should.
You just need to reimport your project it will by default create the new gradle folder

Migrate project to Gradle

I've got a project that used to be in Eclipse. I've since moved it from there into Android Studio, though it's not using the Gradle build system yet.
I've setup my gradle files so that I can do gradlew build from the command-line and it will generate an APK for me.
My question now is how do I get Android studio to build using the gradle files that I've got setup instead of the using the "old" way?
For what it's worth, I'm on Windows 7.
Not sure how you are compiling the project with Android Studio without actually using Gradle because AFAIK Android Studio always uses Gradle under the hoods to build sources.
Anyway, if you have your Gradle config file ready you only have to import it to a new project in Android Studio (File > Import Project... and then select the build.gradle or settings.gradle)

Resources