乍一看,您可能会认为这个问题在网上已经回答过几次了。然而,我在这里和其他地方找到的每篇文章都与将旧的Android项目导入到当今的Android Studio有关,其中一个或多个gradle配置文件已经存在于项目代码树中的一个或多个位置。
然而,在我的例子中,我有一个9年的Android项目,我想在今天的Android Studio中工作,我的项目***不包含任何与gradle相关的文件!!!***
我相信我在2014年最初开发这个项目时使用了IntelliJ或Eclipse。
有没有办法将一个***完全与gradle***无关的旧Android项目导入到今天的Android Studio中,然后成功地为现代版本的Android(Android 11或更高版本)构建它?
我意识到,我可能需要进行一些代码更改,以使旧代码(基于kitkat)在Android 11或更高版本下正常运行。我不是在询问此类代码更改。我只是想知道如何让今天的Android Studio成功导入我的旧项目。***然后***我将能够进行必要的代码更改。
请原谅我,如果我的在线搜索忽略了这个问题的答案。如果是这样,这样一个答案的指针将不胜感激。
提前感谢您的任何帮助和建议。
下面是我的项目中所有文件和目录的列表...
AndroidManifest.xml
project.properties
bin/
bin/AndroidManifest.xml
bin/classes
bin/classes/us
bin/classes/us/potam
bin/classes/us/potam/hippo
bin/classes/us/potam/hippo/experimental
bin/res
src/
src/us
src/us/potam
src/us/potam/hippo
src/us/potam/hippo/experimental
src/us/potam/hippo/experimental/ThirdPartyBase64.java
src/us/potam/hippo/experimental/ExperimentalSMSDBHelper.java
src/us/potam/hippo/experimental/ExperimentalSMSBootReceiver.java
src/us/potam/hippo/experimental/ExperimentalSMSMessage.java
src/us/potam/hippo/experimental/ExperimentalSMSHandler.java
src/us/potam/hippo/experimental/ExperimentalSMSObserver.java
src/us/potam/hippo/experimental/ExperimentalSMSService.java
src/us/potam/hippo/experimental/ExperimentalSMSDataSource.java
src/us/potam/hippo/experimental/ExperimentalSMSMainActivity.java
src/us/potam/hippo/experimental/ExperimentalUtils.java
libs/
proguard-project.txt
gen/
gen/us
gen/us/potam
gen/us/potam/hippo
gen/us/potam/hippo/experimental
gen/us/potam/hippo/experimental/BuildConfig.java
gen/us/potam/hippo/experimental/R.java
out/
out/production
out/production/ExperimentalSMSTrigger
out/production/ExperimentalSMSTrigger/us
out/production/ExperimentalSMSTrigger/us/potam
out/production/ExperimentalSMSTrigger/us/potam/hippo
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/BuildConfig.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/ThirdPartyBase64.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/ExperimentalSMSService.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/R$drawable.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/ExperimentalSMSMainActivity$1.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/ExperimentalUtils.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/ExperimentalSMSDBHelper.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/ThirdPartyBase64$1.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/R$layout.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/ExperimentalSMSBootReceiver.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/R$dimen.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/ExperimentalSMSMainActivity.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/R$id.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/ExperimentalSMSHandler.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/ThirdPartyBase64$OutputStream.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/ExperimentalSMSHandler$1.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/R.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/ExperimentalSMSMessage.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/R$attr.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/ExperimentalSMSDataSource.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/R$string.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/ExperimentalSMSObserver.class
out/production/ExperimentalSMSTrigger/us/potam/hippo/experimental/ThirdPartyBase64$InputStream.class
.idea/
.idea/workspace.xml
.idea/misc.xml
.idea/runConfigurations
.idea/runConfigurations/ExperimentalSMS.xml
.idea/.gitignore
.idea/modules.xml
.classpath
res/
res/values-v14
res/layout
res/layout/main_activity_screen.xml
res/values-v11
res/drawable-hdpi
res/drawable-hdpi/experimental.png
res/drawable
res/drawable/experimental.png
res/drawable-xhdpi
res/drawable-xhdpi/experimental.png
res/values
res/values/dimens.xml
res/values/strings.xml
res/drawable-xxhdpi
res/drawable-xxhdpi/experimental.png
res/drawable-mdpi
res/drawable-mdpi/experimental.png
res/values-w820dp
res/values-w820dp/dimens.xml
res/drawable-ldpi
res/drawable-ldpi/experimental.png
.project
.settings/
.settings/org.eclipse.jdt.core.prefs
ExperimentalSMSTrigger.iml
assets/
1条答案
按热度按时间bjp0bcyl1#
我听从了@Morrison-Chang和@Doron-Ben-Ari的建议,在今天的Android Studio中加载并运行了旧项目!
这就是我最后做的...
1.我在Android Studio中创建了一个与旧项目同名的空项目:
ExperimentalSMSTrigger
.1.我将
MainAction.java
的名称更改为旧项目中使用的名称:ExperimentalSMSMainActivity.java
.1.我将
*.java
文件的其余部分从旧项目复制到ExperimentalSMSMainActivity.java
现在驻留在新项目中的同一目录中。1.我将新项目中的
res
和AndroidManifest.xml
项替换为旧项目中的相应项。1.我将新项目中对
MainActivity
的所有引用的名称更改为ExperimentalSMSMainActivity
。然后我做了一个"构建"和一个"运行",它的工作!
原来我不用对gradle做任何事情。
现在,我只需要编写一些功能增强,由此产生的应用将能够在Android 11或更高版本的Android下运行。
再次感谢你们两位的帮助!